With FLAG_GRANT_READ_URI_PERMISSION
in intent that passed to startActivity
, we can grant Uri
permission if the uri is set using setData
. But if the Uri
in put in EXTRA_STREAM
, the Uri
is not granted before jeallybean.
I know we can use grantUriPermission
followed by a revokeUriPermission
to cancel back the permission granted. But it seems that there is no good place to run revokeUriPermission
.
Is there any better solution? Or any suggestion to put revokeUriPermission
? Thanks in advance.
Related link: How to grant temporary access to custom content provider using FLAG_GRANT_READ_URI_PERMISSION