android - Fastest way to load thumbnails from camera -


i'm trying implement gallery , have gridview displays images (thumbnail) in camera folder. thumbnails, ids using:

final string[] projection =                 new string[] {mediastore.images.media._id};  cursor picturecursor = getactivity().getcontentresolver().query(images.media.external_content_uri,                  projection, null, null, mediastore.images.media._id);  arraylist<integer> ids = new arraylist<integer>(); int idindex = picturecursor.getcolumnindex(mediastore.images.media._id);  while (picturecursor.movetonext()) {              ids.add(picturecursor.getint(idindex)); } 

and read thumbnails, i'm using

bitmap bitmap = mediastore.images.thumbnails.getthumbnail(content_resolver, ids.get(position), mediastore.images.thumbnails.micro_kind, null); 

on asynctask specified in http://developer.android.com/training/displaying-bitmaps/load-bitmap.html

but i'm comparing load times between app vs. android's native gallery app, i'm seeing gallery app loads thumbnails faster app, while having better image quality thumbnails.micro_kind. there faster way load thumbnails use mediastore.images.thumbnails.getthumbnail() function? because gallery app loads thumbnails faster.

note: when app opened, before cache comes play. after cache stores images, load time near instant. so, not cache problem.

edit: thought should clarify. it's not ui getting locked or app slow, since i'm using asynctask read images off ui thread. i'm asking if function mediastore.images.thumbnails.getthumbnail() fastest way load thumbnails stored on phone?

use universal image loader takes care of issues stems loading wrong sizes and/or not caching results.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -