Click or drag to resize

MediaData Class

MediaData provides read access to the result set returned by the AndroidGalleryManager.

Related methods : getFiles, getImageAndVideoFiles, getImageFiles, getVideoFiles and getAllFolders.

Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          AndroidLocalGalleryPluginMediaData

Namespace:  AndroidLocalGalleryPlugin
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public class MediaData : MonoBehaviour

The MediaData type exposes the following members.

Constructors
  NameDescription
Public methodMediaData
Initializes a new instance of the MediaData class.
Top
Methods
  NameDescription
Public methodupdateDataWithArrayString
Convert from string[] to MediaData.
Public methodupdateDataWithMediaData
Updates the this.mediaData with mediaData.
Top
Fields
  NameDescription
Public fielddata

Path to the file on disk.

Note that apps may not have filesystem permissions to directly access this path.

You need to check runtime permission if you want to access this path

Type: TEXT Base64UTF8String

Public fielddate_added

The time the file was added to the media provider.

Units are seconds since 1970.

Type: INTEGER (long)

Public fielddate_modified

The time the file was last modified.

Units are seconds since 1970.

NOTE: This is for internal use by the media scanner.

Type: INTEGER (long)

Public fielddate_taken

The date and time that the image was taken in units of milliseconds since jan 1, 1970.

Type: INTEGER (long)

Public fielddisplay_name

The display name of the file.

Type: TEXT Base64UTF8String

Public fieldheight

The height of the image/video in pixels.

Type: INTEGER

Public fieldid

The unique ID for a row.

Type: INTEGER (long)

Public fieldis_directory

The flag is true if data(path) is a directory.

If the flag is false, it's a file.

Checked by native library whether the file denoted by this abstract data is a directory.

Type: BOOL

Public fieldmedia_type

The media type (audio, video, image or playlist) of the file, or 0 for not a media file

Type: INTEGER

Public fieldmime_type

The MIME type of the file.

Type: TEXT

Public fieldorientation

The orientation for the image expressed as degrees.

Only degrees 0, 90, 180, 270 will work.

Type: INTEGER

Public fieldsize

The size of the file in bytes.

Type: INTEGER (long)

Public fieldtitle

The title of the content.

Type: TEXT Base64UTF8String

Public fieldwidth

The width of the image/video in pixels.

Type: INTEGER

Top
See Also