Video player not working on Jelly Bean device :android.content.ActivityNotFoundException

泄露秘密 提交于 2019-12-11 01:10:02

问题


I recently tried to run my application on JellyBean device and was surprised to see that the video player is not working and throws error:

??-?? ??:??:??.???: INFO/<unknown>(<unknown>): FATAL EXCEPTION: main
??-?? ??:??:??.???: INFO/<unknown>(<unknown>): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=/storage/sdcard0/Android/data/com.packagename.pkg/files/Movies/505c5bea-af51-4100-b95a-e2e87e6126c4.mp4 typ=video/* }

The same works fine on devices 2.2 till 4.0

The relevant code is

Intent intent = new Intent(Intent.ACTION_VIEW);
                    intent.setDataAndType(
                            Uri.parse(type,path), "video/*");
                    startActivity(intent);

Can somebody point what am I doing wrong.

来源:https://stackoverflow.com/questions/12931019/video-player-not-working-on-jelly-bean-device-android-content-activitynotfounde

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!