List of usage examples for android.provider DocumentsContract getDocumentThumbnail
@UnsupportedAppUsage public static Bitmap getDocumentThumbnail(ContentProviderClient client, Uri documentUri, Point size, CancellationSignal signal) throws RemoteException, IOException
From source file:org.sufficientlysecure.keychain.util.FileHelper.java
/** * Retrieve thumbnail of file, document api feature and thus KitKat only */// ww w . j av a2 s. c o m public static Bitmap getThumbnail(Context context, Uri uri, Point size) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { return DocumentsContract.getDocumentThumbnail(context.getContentResolver(), uri, size, null); } else { return null; } }