MediaStore.Images.Media.InterfaceConsts.Data Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Absolute filesystem path to the media item on disk.
[Android.Runtime.Register("DATA")]
public const string Data;
[<Android.Runtime.Register("DATA")>]
val mutable Data : string
Field Value
- Attributes
Remarks
Absolute filesystem path to the media item on disk.
Apps may use this path to do file operations. However, they should not assume that the file is always available. Apps must be prepared to handle any file-based I/O errors that could occur.
From Android 11 onwards, this column is read-only for apps that target android.os.Build.VERSION_CODES#R R
and higher. On those devices, when creating or updating a uri, this column's value is not accepted. Instead, to update the filesystem location of a file, use the values of the #DISPLAY_NAME
and #RELATIVE_PATH
columns.
Though direct file operations are supported, ContentResolver#openFileDescriptor(Uri, String)
API is recommended for better performance.
Java documentation for android.provider.MediaStore.MediaColumns.DATA
.
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.