Package io.scanbot.sdk.util
Object FileChooserUtils
-
- All Implemented Interfaces:
public class FileChooserUtilsProvides methods for extracting image path from chooser
-
-
Field Summary
Fields Modifier and Type Field Description public final static FileChooserUtilsINSTANCE
-
Method Summary
Modifier and Type Method Description final static StringgetPath(Context context, Uri uri, FileIOProcessor fileIOProcessor)Get a file path from a Uri. final static StringgetDataColumn(Context context, Uri uri, String selection, Array<String> selectionArgs)Get the value of the data column for this Uri. final static BooleanisExternalStorageDocument(Uri uri)final static BooleanisDownloadsDocument(Uri uri)final static BooleanisMediaDocument(Uri uri)-
-
Method Detail
-
getPath
final static String getPath(Context context, Uri uri, FileIOProcessor fileIOProcessor)
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.
-
-
-
-