Språk

MediaStore.GetVersion Method

Definition

Overloads

Name Description
GetVersion(Context, String)

Return an opaque version string describing the MediaStore state.

GetVersion(Context)

Return an opaque version string describing the MediaStore state.

GetVersion(Context, String)

Return an opaque version string describing the MediaStore state.

[Android.Runtime.Register("getVersion", "(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=29)]
public static string GetVersion(Android.Content.Context context, string volumeName);
[<Android.Runtime.Register("getVersion", "(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=29)>]
static member GetVersion : Android.Content.Context * string -> string

Parameters

context
Context

The context whose content resolver sends the media-provider request.

volumeName
String

specific volume to obtain an opaque version string for. Must be one of the values returned from #getExternalVolumeNames(Context).

Returns

The opaque version text returned for the requested volume; it may be null when the provider supplies no version.

Attributes

Remarks

Return an opaque version string describing the MediaStore state.

Applications that import data from MediaStore into their own caches can use this to detect that MediaStore has undergone substantial changes, and that data should be rescanned.

No other assumptions should be made about the meaning of the version.

Java documentation for android.provider.MediaStore.getVersion(android.content.Context, java.lang.String).

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

GetVersion(Context)

Return an opaque version string describing the MediaStore state.

[Android.Runtime.Register("getVersion", "(Landroid/content/Context;)Ljava/lang/String;", "")]
public static string GetVersion(Android.Content.Context context);
[<Android.Runtime.Register("getVersion", "(Landroid/content/Context;)Ljava/lang/String;", "")>]
static member GetVersion : Android.Content.Context -> string

Parameters

context
Context

Context to use for performing the query.

Returns

The opaque version text returned for the primary external volume; it may be null when the provider supplies no version.

Attributes

Remarks

Return an opaque version string describing the MediaStore state.

Applications that import data from MediaStore into their own caches can use this to detect that MediaStore has undergone substantial changes, and that data should be rescanned.

No other assumptions should be made about the meaning of the version.

This method returns the version for MediaStore#VOLUME_EXTERNAL_PRIMARY; to obtain a version for a different volume, use #getVersion(Context, String).

Java documentation for android.provider.MediaStore.getVersion(android.content.Context).

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