Hi Programming fellas
I have uploaded our apk to google play console but they have rejected our apk and mentioning use Media Store Api for camera and gallery.
My App has already implemented and use WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE permission and work fine on all android version
The problem arise when I changed target sdk to 30 and submit app.These are the permission which I used for READ WRITE operation.
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29"
/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
I have attached screen shot of rejection from google play too.Previously I have tried to use MANAGE_EXTERNAL_STORAGE permission but still our app was rejected
If any body encounter with this issue kindly post a solution for this
Thanks ...
Play Console Rejection
Play Console Rejection
In Android 11, the way to access external storage has changed a bit.
Source: Storage updates in Android 11
In my case, I've solved my problem like this:
I added file_path.xml in path src/main/res/xml
FilePath
I've used getExternalFilesDir for get file in the device storage.
Before:
val mPath = Environment.getExternalStorageDirectory().toString() + "/Ticket_" + date + ".jpeg"
After:
val mPath = context.getExternalFilesDir(Environment.DIRECTORY_PICTURES).toString() + "/Ticket_" + date + ".jpeg"
I hope help you :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With