相关疑难解决方法(0)

Android:无法使用视频调用图库

我正在尝试用加载它的视频调用android库.此方法适用于意图,android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI但它不能正常工作,并返回以下异常.有人可以把我赶出去吗

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
Run Code Online (Sandbox Code Playgroud)

我的代码如下

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, …
Run Code Online (Sandbox Code Playgroud)

video android gallery android-intent

1
推荐指数
1
解决办法
4392
查看次数

标签 统计

android ×1

android-intent ×1

gallery ×1

video ×1