Created
January 8, 2012 02:25
-
-
Save kan/1576906 to your computer and use it in GitHub Desktop.
Images.Mediaの有効なbucket一覧を取得する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Uri uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI; | |
| Cursor c = managedQuery(uri, null, null, null, null); | |
| buckets.clear(); | |
| c.moveToFirst(); | |
| for (int i = 0; i < c.getCount(); i++) { | |
| String bucket_id = c | |
| .getString(c.getColumnIndexOrThrow("bucket_id")); | |
| String bucket_name = c.getString(c | |
| .getColumnIndexOrThrow("bucket_display_name")); | |
| buckets.put(bucket_id, bucket_name); | |
| c.moveToNext(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment