I'm received the output path that i can't

2019-04-02 09:29发布

I'm received the output path(EXTRA_OUTPUT) that i can't access because It's custom content provider on android.

My app is supporting the IMAGE_CAPTURE for other apps. but my app isn't works when I received the capture intent by the chrome browser. I had debugging and I found the invalid URI from intent by the Chrome browser. It's URI of custom content provider that I don't have access permission.

I have to compress my bitmap to output path(EXTRA_OUTPUT) for retrun the result. but If i access the uri. my app occurs the SecurityException. How can i write capure bitmap to this uri ?

The chrome browser is sent me the uri for custom content provider.

Bundle[{output=content://com.android.chrome.FileProvider/images/1460353414880661298992.jpg}]

ex content://com.android.chrome.FileProvider/images/14603482183391770716616.jpg

if i'm try to get the file path to call the query 'context.getContentResolver().query(receiverURI)', It throw SecurityException.

It's same when to open outputStream context.getContentResolver().openOutputStream(uri);

java.lang.SecurityException:
Permission Denial: opening provider org.chromium.chrome.browser.util.CompatibilityFileProvider

How i can write my bitmap to the output uri the received by chrome browser app ?

0条回答
登录 后发表回答