Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI);
intent = Intent.createChooser(intent, "Pick");
startActivity(intent, 0);
但我得到了
java.lang.RuntimeException: Unable to start activity ComponentInfo{android/com.android.internal.app.ChooserActivity}: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.PICK dat=content://media/external/video/media flg=0x3000000 cmp=com.android.music/.VideoBrowserActivity }
在许多Android设备上。
我尝试通过
捕获此异常try{
startActivity(intent, 0);
}catch(Exception ex){
//nothing to do
}
但它不起作用。
如何捕获此异常以使我的应用程序不崩溃?
答案 0 :(得分:1)
我也遇到过类似的问题,我担心它无法解决。所以......也许您可以发送报告或尝试其他环境,例如iOS。