Hi Ravi,

I'm dealin wit thumbnails for media files.
I have seen that but the problem is, you get the cursor for all media files
on external storage, how do i extract separate file info to capture the
thumbnails ?

The link you hav sent is for Images.

I'm attaching that line of code, suggest me if i hav some option in doin it.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Cursor cr = cr.query(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, null,
null, null, null);

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Thanks and Regards,
Veda.
On Tue, Jun 23, 2009 at 11:58 AM, RaviY <yend...@pv.com> wrote:

>
> I don't think that's the right way to get thumbnails. One is expected
> to extract data from this MediaStore.
>
>
> http://developer.android.com/reference/android/provider/MediaStore.Images.Thumbnails.html
>
> -Ravi
>
> On Jun 23, 1:02 am, Veda K <vedamurthy...@gmail.com> wrote:
> > Hi ,
> >
> > We have developed a media player application on Android application
> > framework.
> >
> > I'm facing problem in capturing thumbnails.
> >
> > it is not giving any error but the bitmap am getting is null.
> >
> > am attaching the code i hav written.
> >
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> > public Bitmap fullSizeBitmap()  {
> >
> >     try {
> >         //File dir=new File("/sdcard");
> >         //File files[] = dir.listFiles();
> >         ParcelFileDescriptor pfdInput = ParcelFileDescriptor.open( new
> > File("/sdcard/sample.3gp"), ParcelFileDescriptor.MODE_READ_ONLY);
> >         if(pfdInput == null)
> >             System.out.println(pfdInput + "---------------pfdInput NULL
> > ----------------------");
> >         System.out.println(pfdInput + "---------------pfdInput Not NULL
> > ----------------------");
> >
> >         BitmapFactory.Options options = new BitmapFactory.Options();
> >         options.inSampleSize = 1;
> >
> >         options.inJustDecodeBounds = true;
> >         java.io.FileDescriptor fd = pfdInput.getFileDescriptor();
> >
> >         Bitmap k = Bitmap.createBitmap(32, 32, Bitmap.Config.RGB_565);
> >          k = BitmapFactory.decodeFileDescriptor(fd, null, options);
> >
> >         pfdInput.close();
> >         if(k == null)
> >         {
> >             System.out.println("---------------------K
> > Null-----------------------------");
> >         }
> >         return k;
> >     } catch (Exception ex) {
> >         System.out.println("---------------------Hits
> > Here-----------------------------");
> >         return null;
> >     }
> >
> > }
> >
> >
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> >
> > If anyone knows how to do it, please help me.
> >
> > Thanks and Regards,
> > Veda.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to android-framework@googlegroups.com
To unsubscribe from this group, send email to 
android-framework+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to