cloudinary / cloudinary_android

Android client for integrating with Cloudinary
MIT License
67 stars 59 forks source link

Fix sample app #128

Closed adimiz1 closed 2 years ago

adimiz1 commented 2 years ago

Sample app is currently broken, picking an image from the upload widget fails due to permission denial A little research lead to StackOverFlow 2 changes were made in order to make it work First of all we need to use Intent.ACTION_OPEN_DOCUMENT instead of Intent.ACTION_GET_CONTENT ACTION_GET_CONTENT saves the uri for a short period and we need more than that when we upload an image With that comes the permission: FLAG_GRANT_READ_URI_PERMISSION , that one replaced FLAG_GRANT_PERSISTABLE_URI_PERMISSION due to a different approach in the intent action.