List of usage examples for android.provider OpenableColumns SIZE
String SIZE
To view the source code for android.provider OpenableColumns SIZE.
Click Source Link
From source file:com.fa.mastodon.activity.ComposeActivity.java
private static long getMediaSize(ContentResolver contentResolver, Uri uri) { long mediaSize; Cursor cursor = contentResolver.query(uri, null, null, null, null); if (cursor != null) { int sizeIndex = cursor.getColumnIndex(OpenableColumns.SIZE); cursor.moveToFirst();//from w w w . j av a 2s. c om mediaSize = cursor.getLong(sizeIndex); cursor.close(); } else { mediaSize = MEDIA_SIZE_UNKNOWN; } return mediaSize; }