MediaStore

interface MediaStore : Peripheral

MediaStore peripheral interface for com.parrot.drone.groundsdk.device.Drone devices.

Aggregates information on all medias stored on a device, allowing the application to browse such media, to delete them physically from the drone where they are stored, as well as to download them locally on the device from the drone where they are stored.

This peripheral can be obtained from a Drone using:

drone.getPeripheral(MediaStore.class)

See also

com.parrot.drone.groundsdk.device.peripheral.Peripheral.Provider

Types

Link copied to clipboard
enum DownloadType
Media download type.
Link copied to clipboard
enum IndexingState
Indexing state of the media store.

Functions

Link copied to clipboard
abstract fun browse(@NonNull observer: Ref.Observer<List<MediaItem>>): Ref<List<MediaItem>>
Creates a new media list for browsing media on every storage of the drone.
abstract fun browse(@Nullable storageType: UserStorage.Type, @NonNull observer: Ref.Observer<List<MediaItem>>): Ref<List<MediaItem>>
Creates a new media list for browsing media on a specific storage.
Link copied to clipboard
abstract fun delete(@NonNull resources: Collection<MediaItem.Resource>, @NonNull observer: Ref.Observer<MediaDeleter>): Ref<MediaDeleter>
Deletes resources from the device's internal storage.
Link copied to clipboard
abstract fun download(    @NonNull resources: Collection<MediaItem.Resource>,     @NonNull destination: MediaDestination,     @NonNull observer: Ref.Observer<MediaDownloader>): Ref<MediaDownloader>
Downloads media resources from the device's internal storage.
abstract fun download(    @NonNull resources: Collection<MediaItem.Resource>,     @NonNull type: MediaStore.DownloadType,     @NonNull destination: MediaDestination,     @NonNull observer: Ref.Observer<MediaDownloader>): Ref<MediaDownloader>
Downloads media resources of the given type from the device's internal storage.
Link copied to clipboard
abstract fun fetchThumbnailOf(@NonNull media: MediaItem, @NonNull observer: Ref.Observer<Bitmap>): Ref<Bitmap>
Retrieves a media thumbnail.
abstract fun fetchThumbnailOf(@NonNull resource: MediaItem.Resource, @NonNull observer: Ref.Observer<Bitmap>): Ref<Bitmap>
Retrieves a resource thumbnail.
Link copied to clipboard
abstract fun getIndexingState(): MediaStore.IndexingState
Retrieves the current indexing state of the media store.
Link copied to clipboard
@IntRange(from = 0)
abstract fun getPhotoMediaCount(): Int
Retrieves the total amount of photo media items in the media store.
Link copied to clipboard
@IntRange(from = 0)
abstract fun getPhotoResourceCount(): Int
Retrieves the total amount of photo resources in the media store.
Link copied to clipboard
@IntRange(from = 0)
abstract fun getVideoMediaCount(): Int
Retrieves the total amount of video media items in the media store.
Link copied to clipboard
@IntRange(from = 0)
abstract fun getVideoResourceCount(): Int
Retrieves the total amount of video resources in the media store.
Link copied to clipboard
abstract fun upload(    @NonNull resources: Collection<File>,     @NonNull target: MediaItem,     @NonNull observer: Ref.Observer<ResourceUploader>): Ref<ResourceUploader>
Upload media resources to the device's internal storage.
Link copied to clipboard
abstract fun wipe(@NonNull observer: Ref.Observer<MediaStoreWiper>): Ref<MediaStoreWiper>
Wipes all media from the device's internal storage.