multithreading - how to do thread operations in android -


anyone give example program explains android threads in simpler way. example, want list out songs in sd card in thread @ time of launch

i using following code number of songs in sd card of android device. want list out songs in thread

private void init_phone_sd_card()      {            system.gc();         final string[] proj = { mediastore.audio.media._id,mediastore.audio.media.data,mediastore.audio.media.display_name,mediastore.audio.media.size };         log.e("media",""+proj);          musiccursor = managedquery(mediastore.audio.media.external_content_uri,proj, null, null, null);         log.e("media1",""+musiccursor);          count = musiccursor.getcount();         log.e("media2",""+count); 

how this......

thx

just put code asynctask's doinbackground() method. task should show progressdialog in order tell user useful work running. see this article.


Comments