Läs på engelska

Dela via


MediaStore.GetVersion Method

Definition

Overloads

GetVersion(Context)

Return an opaque version string describing the MediaStore state.

GetVersion(Context, String)

Return an opaque version string describing the MediaStore state.

GetVersion(Context)

Return an opaque version string describing the MediaStore state.

C#
[Android.Runtime.Register("getVersion", "(Landroid/content/Context;)Ljava/lang/String;", "")]
public static string GetVersion(Android.Content.Context context);

Parameters

context
Context

Context to use for performing the query.

Returns

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

.NET for Android .NET for Android API 35 och .NET for Android .NET for Android API 34
Produkt Versioner
.NET for Android .NET for Android API 34, .NET for Android API 35

GetVersion(Context, String)

Return an opaque version string describing the MediaStore state.

C#
[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);

Parameters

context
Context
volumeName
String

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

Returns

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

.NET for Android .NET for Android API 35 och .NET for Android .NET for Android API 34
Produkt Versioner
.NET for Android .NET for Android API 34, .NET for Android API 35