On Thu, Jun 25, 2009 at 8:27 AM, manoj<manojkumar.m...@gmail.com> wrote:
>
> String[] videoProjection = new String[] {
>                        android.provider.MediaStore.Video.Media._ID,
>                        android.provider.MediaStore.Video.Media.TITLE,
>                        android.provider.MediaStore.Video.Media.DATE_ADDED,
>                        android.provider.MediaStore.Video.Media.SIZE,
>                        android.provider.MediaStore.Video.Media.DISPLAY_NAME,
>                        android.provider.MediaStore.Video.Media.MIME_TYPE};
>
> Cursor videocursor1 =  cr.query
> (android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI ,
> videoProjection, null, null, null);
>
> videocursor1.moveToFirst();
>
> Uri uri = android.provider.MediaStore.Video.Media.getContentUri
> (displayName);

This is wrong. That method takes the volume name as its argument (i.e.
"internal" or "external"), not the display name of a file. You should
start with android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI,
and then append the _ID value. The final content Uri should look
something like "content://media/external/video/media/5"

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to