A little more clarification . if I open gallery application, it displays only a few images/audios/videos and sometimes, MediaScanner doesnot detect any files. but through the "adb shell" , I can see the presence of all the files that are being pushed onto sdcard.
Can somebody help me out, on what exactly going on? Thanks in advance. umesh. ________________________________ From: Umesh <javaumesh-andr...@yahoo.co.in> To: google <android-developers@googlegroups.com> Sent: Saturday, 26 September, 2009 1:57:16 PM Subject: [android-developers] SDCARD images/audio/video not reflected in gallery. 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. ________________________________ Keep up with people you care about with Yahoo! India Mail. Learn how. 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---