Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.SecurityException: UID 10274 does not have permission to content://media/external/video/media/293361 [user 0] #248

Open
panyiyiyi opened this issue Nov 10, 2022 · 2 comments

Comments

@panyiyiyi
Copy link

java.lang.SecurityException: UID 10274 does not have permission to content://media/external/video/media/293361 [user 0]
at android.os.Parcel.createExceptionOrNull(Parcel.java:2425)
at android.os.Parcel.createException(Parcel.java:2409)
at android.os.Parcel.readException(Parcel.java:2392)
at android.os.Parcel.readException(Parcel.java:2334)
at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:2670)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1743)
at android.app.Activity.startActivityForResult(Activity.java:5533)
at androidx.activity.ComponentActivity.startActivityForResult(Unknown Source:0)
at android.app.Activity.startActivityForResult(Activity.java:5486)
at androidx.activity.ComponentActivity.startActivityForResult(Unknown Source:0)
at android.app.Activity.startActivity(Activity.java:5892)
at android.app.Activity.startActivity(Activity.java:5845)
at com.huantansheng.easyphotos.ui.adapter.PreviewPhotosAdapter$1.onClick(Unknown Source:55)
at android.view.View.performClick(View.java:7753)
at android.view.View.performClickInternal(View.java:7730)
at android.view.View.access$3700(View.java:861)
at android.view.View$PerformClick.run(View.java:29146)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8293)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)

@EgbertYuan
Copy link

我也遇到这个问题,运行demo的时候,选择视频,然后点击预览播放,就会报这个错,是必现的,是权限问题吧?

@shunFSKi
Copy link

shunFSKi commented Dec 15, 2022

#219 (comment)

private void toPlayVideo(View v, Uri uri, String type) {
Context context = v.getContext();
Intent intent = new Intent(Intent.ACTION_VIEW);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.putExtra(Intent.EXTRA_STREAM, uri);
}
intent.setDataAndType(uri, type);
context.startActivity(intent);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants