Package io.scanbot.sdk.util
Object FileChooserUtils
-
- All Implemented Interfaces:
public class FileChooserUtils
Provides methods for extracting image path from chooser
-
-
Field Summary
Fields Modifier and Type Field Description public final static FileChooserUtils
INSTANCE
-
Method Summary
Modifier and Type Method Description final static String
getPath(Context context, Uri uri)
Get a file path from a Uri. final static String
getDataColumn(Context context, Uri uri, String selection, Array<String> selectionArgs)
Get the value of the data column for this Uri. final static Boolean
isExternalStorageDocument(Uri uri)
final static Boolean
isDownloadsDocument(Uri uri)
final static Boolean
isMediaDocument(Uri uri)
-
-
Method Detail
-
getPath
final static String getPath(Context context, Uri uri)
Get a file path from a Uri. This will get the the path for Storage Access Framework Documents, as well as the _data field for the MediaStore and other file-based ContentProviders.
- Parameters:
context
- The context.uri
- The Uri to query.
-
getDataColumn
final static String getDataColumn(Context context, Uri uri, String selection, Array<String> selectionArgs)
Get the value of the data column for this Uri. This is useful for MediaStore Uris, and other file-based ContentProviders.
- Parameters:
context
- The context.uri
- The Uri to query.selection
- (Optional) Filter used in the query.selectionArgs
- (Optional) Selection arguments used in the query.
-
isExternalStorageDocument
final static Boolean isExternalStorageDocument(Uri uri)
- Parameters:
uri
- The Uri to check.
-
isDownloadsDocument
final static Boolean isDownloadsDocument(Uri uri)
- Parameters:
uri
- The Uri to check.
-
isMediaDocument
final static Boolean isMediaDocument(Uri uri)
- Parameters:
uri
- The Uri to check.
-
-
-
-