How to invoke default gallery with list of video

All your problems with Audio, Video and Images.

How to invoke default gallery with list of video

Postby mayooresan » Tue Aug 09, 2011 5:21 pm

I'm trying to invoke android gallery with videos loaded with it. This method working fine for the intent android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI but it doesn't work properly for me and returned following exceptions. Can someone hlep me out please.

This is my code
Code: Select all
public class SDCardVideoActivity extends Activity {
    final int REQ_CODE_PICK_VIDEO = 1;
    String outputfilepath;
    SQLiteDatabase db;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.header);
        Intent i = new Intent(Intent.ACTION_PICK,
                android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI);
        startActivityForResult(i, REQ_CODE_PICK_VIDEO);
    }

}


and this is the error message recieved in the DDMS log
Code: Select all
08-09 17:12:26.992: ERROR/AndroidRuntime(878): java.lang.RuntimeException: Unable to start activity ComponentInfo{a.b/a.b.SDCardVideoActivity}: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.PICK dat=content://media/external/video/media cmp=com.google.android.music/com.android.music.VideoBrowserActivity } from ProcessRecord{4052da08 878:a.b/10053} (pid=878, uid=10053) requires null




08-09 17:12:26.992: ERROR/AndroidRuntime(878): Caused by: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.PICK dat=content://media/external/video/media cmp=com.google.android.music/com.android.music.VideoBrowserActivity } from ProcessRecord{4052da08 878:a.b/10053} (pid=878, uid=10053) requires null


Where am I going wrong? can someone help me out please.
mayooresan
Freshman
Freshman
 
Posts: 3
Joined: Tue Aug 09, 2011 5:17 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 8 guests