Hi all,

I have pushed around 10 files of each image(*.png ), audio(*.mp3) and 
video(*.mp4 & *.3gp) after that I have restarted the emulator and when I open 
the gallery application I see only a few files being present in sdcard. (in my 
case 1 video, 2 images and 2 audio clips) . 

is this a bug in emulator?

because I have written a piece of code that displays the images/audio/video . 
But due to above mentioned issue I'm not able to display/play the images. 

snippet of implementation is as follows:

public void displayImages(){
Uri uri = MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI; 
    String[] projection = { 
    MediaStore.Images.ImageColumns._ID,
    MediaStore.Images.ImageColumns.DATA        
    };

    mCursor = this.managedQuery(uri, projection, null, 
null,MediaStore.Images.Thumbnails.IMAGE_ID + "");
Log.i("MP", "Total Number of images present on sdcard"+mCursor.getCount());     
   
....
...
...
...
}

public void playAudios(){
    Uri uri = MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI; 
    String[] projection = {     
            MediaStore.Audio.AudioColumns._ID   }; 
    mCursor = this.managedQuery(uri, projection, null, null, 
MediaStore.Audio.AudioColumns._ID + "");
Log.i("MP", "Total Number of images present on sdcard"+mCursor.getCount());     
   
...
...
...
}

public void playVideos(){
Uri uri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI; 
    String[] projection = { 
            MediaStore.Video.VideoColumns._ID   };
    mCursor = this.managedQuery(uri, projection, null, null, 
MediaStore.Video.VideoColumns._ID + "");
Log.i("MP", "Total Number of images present on sdcard"+mCursor.getCount());     
   
...
...
...
}


in above all the 3 cases I get the mCursor.getCount() less than the actual 
number of respective files present on the sdcard. can someone guide me where 
I'm going wrong. 


Thanks 
umesh. 


      Yahoo! India has a new look. Take a sneak peek http://in.yahoo.com/trynew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to