Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android permissions not working on Android 10 #2444

Closed
Axentiev opened this issue Apr 3, 2021 · 1 comment
Closed

Android permissions not working on Android 10 #2444

Axentiev opened this issue Apr 3, 2021 · 1 comment

Comments

@Axentiev
Copy link

Axentiev commented Apr 3, 2021

I am creating a regular application for android
When I add lines
from android.permissions import request_permissions, Permission
request_permissions([Permission.READ_EXTERNAL_STORAGE, Permission.WRITE_EXTERNAL_STORAGE])
to my code and
android.permissions = INTERNET, WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE
to my buildozer.spec
Permissions are requested, issued, but in the logs:
"Permission denied "/sdcard/Android/data/MyFolderName" "
And app crashes
I ran the app on two devices

Mint Cinnamon
Android 10
Python 3.8.1
Kivy 1.9.1
Cython 0.29.19

@inclement
Copy link
Member

inclement commented Apr 3, 2021

In target API 29+ the WRITE_EXTERNAL_STORAGE permission no longer does anything. Apps simply aren't allowed to freely browse the external storage filesystem.

In target API 29 you can revert to the old behaviour by putting android:requestLegacyExternalStorage="true" in your AndroidManifest.xml, in the application tag.

This does not affect your ability to write to the app-specific directory in external storage, you always have permission for that. The path to that directory can be obtained as described in the documentation. I'm not clear if this is what you are trying.

If this does not explain your permissions failure, please give full details (ideally a minimal runnable example) of what you're attempting to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants