This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Download Microsoft Edge
More info about Internet Explorer and Microsoft Edge
Convenience for constructing a
MediaScannerConnection
, calling
#connect
on it, and calling
#scanFile(String, String)
with the given
<var>path</var> and <var>mimeType</var> when the connection is
established.
[Android.Runtime.Register("scanFile", "(Ljava/lang/String;Ljava/lang/String;)V", "GetScanFile_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual void ScanFile (string? path, string? mimeType);
[<Android.Runtime.Register("scanFile", "(Ljava/lang/String;Ljava/lang/String;)V", "GetScanFile_Ljava_lang_String_Ljava_lang_String_Handler")>]
abstract member ScanFile : string * string -> unit
override this.ScanFile : string * string -> unit
Parameters
Remarks
Requests the media scanner to scan a file. Success or failure of the scanning operation cannot be determined until
MediaScannerConnectionClient#onScanCompleted(String, Uri)
is called.
Java documentation for
android.media.MediaScannerConnection.scanFile(java.lang.String, 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.
Convenience for constructing a
MediaScannerConnection
, calling
#connect
on it, and calling
#scanFile(String, String)
with the given
<var>path</var> and <var>mimeType</var> when the connection is
established.
[Android.Runtime.Register("scanFile", "(Landroid/content/Context;[Ljava/lang/String;[Ljava/lang/String;Landroid/media/MediaScannerConnection$OnScanCompletedListener;)V", "")]
public static void ScanFile (Android.Content.Context? context, string[]? paths, string[]? mimeTypes, Android.Media.MediaScannerConnection.IOnScanCompletedListener? callback);
[<Android.Runtime.Register("scanFile", "(Landroid/content/Context;[Ljava/lang/String;[Ljava/lang/String;Landroid/media/MediaScannerConnection$OnScanCompletedListener;)V", "")>]
static member ScanFile : Android.Content.Context * string[] * string[] * Android.Media.MediaScannerConnection.IOnScanCompletedListener -> unit
Parameters
The caller's Context, required for establishing a connection to
the media scanner service.
Success or failure of the scanning operation cannot be determined until
MediaScannerConnectionClient#onScanCompleted(String, Uri)
is called.
Optional callback through which you can receive the
scanned URI and MIME type; If null, the file will be scanned but
you will not get a result back.
Remarks
Java documentation for
android.media.MediaScannerConnection.scanFile(android.content.Context, java.lang.String[], java.lang.String[], android.media.OnScanCompletedListener)
.
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.