public class DocumentHelper
extends java.lang.Object
| Constructor and Description |
|---|
DocumentHelper() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getDataColumn(Context context,
Uri uri,
java.lang.String selection,
java.lang.String[] selectionArgs)
Get the value of the data column for this Uri.
|
static java.lang.String |
getPath(Context context,
Uri uri)
Get a file path from a Uri.
|
static boolean |
isDownloadsDocument(Uri uri) |
static boolean |
isExternalStorageDocument(Uri uri) |
static boolean |
isGooglePhotosUri(Uri uri) |
static boolean |
isMediaDocument(Uri uri) |
public static java.lang.String getPath(Context context,
Uri uri)
context - The context.uri - The Uri to query.public static java.lang.String getDataColumn(Context context,
Uri uri,
java.lang.String selection,
java.lang.String[] selectionArgs)
context - The context.uri - The Uri to query.selection - (Optional) Filter used in the query.selectionArgs - (Optional) Selection arguments used in the query.public static boolean isExternalStorageDocument(Uri uri)
uri - The Uri to check.public static boolean isDownloadsDocument(Uri uri)
uri - The Uri to check.public static boolean isMediaDocument(Uri uri)
uri - The Uri to check.public static boolean isGooglePhotosUri(Uri uri)
uri - The Uri to check.