Class MediaResult

  • All Implemented Interfaces:
    java.lang.Comparable<MediaResult>


    public class MediaResult
    extends java.lang.Object
    implements java.lang.Comparable<MediaResult>
    Model object, used to return results.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static <any> CREATOR 
      static long UNKNOWN_VALUE 
    • Constructor Summary

      Constructors 
      Constructor and Description
      MediaResult(java.io.File file, Uri uri, Uri originalUri, java.lang.String name, java.lang.String mimeType, long size, long width, long height) 
    • Field Detail

      • CREATOR

        public static final <any> CREATOR
    • Constructor Detail

      • MediaResult

        public MediaResult(java.io.File file,
                           Uri uri,
                           Uri originalUri,
                           java.lang.String name,
                           java.lang.String mimeType,
                           long size,
                           long width,
                           long height)
    • Method Detail

      • getFile

        public java.io.File getFile()
        Get the resolved File.
        Returns:
        The File
      • getUri

        public Uri getUri()
        Get the Uri to the File.
        The returned Uri points to the BelvedereFileProvider and could be used to open the File in a 3rd party app or share it with other apps.
        Returns:
        The Uri
      • getOriginalUri

        public Uri getOriginalUri()
        Get the original Uri to the media.

        This might not always be available or be invalid. This is the original Uri before it was resolved.

        Returns:
        the original Uri
      • describeContents

        public int describeContents()
      • getName

        public java.lang.String getName()
        Get the name of the file.
      • getMimeType

        public java.lang.String getMimeType()
        Get the mime type of the file
      • getSize

        public long getSize()
        Gets the file size.
      • getWidth

        public long getWidth()
        Gets the width of the image.
      • getHeight

        public long getHeight()
        Gets the height of the image.
      • writeToParcel

        public void writeToParcel(Parcel dest,
                                  int flags)
      • equals

        public boolean equals(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        public int compareTo(MediaResult o)
        Specified by:
        compareTo in interface java.lang.Comparable<MediaResult>