Class UriUtils


  • public class UriUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      UriUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static MediaType getMediaType​(android.content.Context context, android.net.Uri uri)
      Get the media type of the Uri.
      static android.graphics.Bitmap getVideoThumbnail​(android.content.Context context, android.net.Uri uri)
      Get the first frame of a video
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UriUtils

        public UriUtils()
    • Method Detail

      • getMediaType

        public static MediaType getMediaType​(android.content.Context context,
                                             @NonNull
                                             android.net.Uri uri)
        Get the media type of the Uri.
        Parameters:
        context - Android context.
        uri - Uri of a media file.
        Returns:
        The media type of the file.
      • getVideoThumbnail

        public static android.graphics.Bitmap getVideoThumbnail​(android.content.Context context,
                                                                android.net.Uri uri)
        Get the first frame of a video
        Parameters:
        context - Android context.
        uri - Uri of the video file.
        Returns:
        First frame of the video.