MediaStore.MarkIsFavoriteStatus Method

Definition

Sets the media isFavorite status if the calling app has wider read permission on media files for given type.

[Android.Runtime.Register("markIsFavoriteStatus", "(Landroid/content/ContentResolver;Ljava/util/Collection;Z)V", "", ApiSince=36)]
public static void MarkIsFavoriteStatus(Android.Content.ContentResolver resolver, System.Collections.Generic.ICollection<Android.Net.Uri> uris, bool areFavorites);
[<Android.Runtime.Register("markIsFavoriteStatus", "(Landroid/content/ContentResolver;Ljava/util/Collection;Z)V", "", ApiSince=36)>]
static member MarkIsFavoriteStatus : Android.Content.ContentResolver * System.Collections.Generic.ICollection<Android.Net.Uri> * bool -> unit

Parameters

resolver
ContentResolver

used to connect with MediaStore#AUTHORITY

uris
ICollection<Uri>

a collection of media items to include in this request. Each item must be hosted by MediaStore#AUTHORITY and must reference a specific media item by BaseColumns#_ID sample uri - content://media/external_primary/images/media/24

areFavorites
Boolean

the MediaColumns#IS_FAVORITE value to apply.

Attributes

Remarks

Sets the media isFavorite status if the calling app has wider read permission on media files for given type. Calling app should have one of READ_EXTERNAL_STORAGE or WRITE_EXTERNAL_STORAGE if target sdk <= T. For target sdk > T, it should have READ_MEDIA_IMAGES for images, READ_MEDIA_VIDEOS for videos or READ_MEDIA_AUDIO for audio files or MANAGE_EXTERNAL_STORAGE permission.

Java documentation for android.provider.MediaStore.markIsFavoriteStatus(android.content.ContentResolver, java.util.Collection<android.net.Uri>, boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to