嗨我想在android文件系统中添加新功能后修复问题,但是我收到此错误:
android.os.FileUriExposedException:file:///storage/emulated/0/MyApp/Camera_20180105_172234.jpg通过ClipData.Item.getUri()暴露在app之外
所以我希望有人可以帮我解决这个问题:)
谢谢
android.os.FileUriExposedException: file:///storage/emulated/0/MyApp/Camera_20180105_172234.jpg exposed beyond app through ClipData.Item.getUri()
Run Code Online (Sandbox Code Playgroud) 我无法在 Android 中使用 Intent 在 Instagram 提要上分享任何照片。它打开 Instagram 并显示“无法加载照片”错误并返回到我的应用程序。
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("image/*");
share.putExtra(Intent.EXTRA_STREAM, uri);
share.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(Intent.createChooser(share, "Share to"));
Run Code Online (Sandbox Code Playgroud)
相同的代码适用于 Instagram 版本 131.0.0.23.116,但不适用于当前更新的版本 134.0.0.26.121