我现在有个功能,我需要先选择一个外部文件,在一定的条件下我会把这个外部文件交给另一个程序去打开。
目前我已经获取到了文件的Document Uri,类似这样
content://com.android.providers.media.documents/document/image:8269
我自己的程序立即访问的话到是没有问题,但是通过 Intent.ACTION_VIEW 把这个uri设置到intent的data移交给第三方程序打开就会报SecurityException
java.lang.SecurityException: UID 10128 does not have permission to content://com.android.providers.media.documents/document/image%3A8269 [user 0]; you could obtain access using ACTION_OPEN_DOCUMENT or related APIs
请问有没有办法让第三方程序打开这个文件?
谢谢各位。