Storage permission failed on Android 10

340 views
Skip to first unread message

Degenerate Tech

unread,
Nov 22, 2020, 3:19:28 AM11/22/20
to Kivy users support
I have made an app and i am taking Write_Extenal_storage permission in build method using python android library ..it is saving  files in android 8.0
Android 5.0 but 

In android 10 Not saving files in sdcard shows permission denied but I have allowed at the beginning .

Degenerate Tech

unread,
Nov 22, 2020, 4:16:14 AM11/22/20
to Kivy users support
https://stackoverflow.com/questions/8854359/exception-open-failed-eacces-permission-denied-on-android
i think i have to add this in AndroidManifest.xml how to do through buildozer.spec ? 
<manifest ... >
    <!-- This attribute is "false" by default on apps targeting Android Q. -->
    <application android:requestLegacyExternalStorage="true" ... >
     ...
    </application>
</manifest>

planckp...@gmail.com

unread,
Nov 22, 2020, 12:29:12 PM11/22/20
to Kivy users support
Android permissions changed again with 10.
Now think in terms of App permissions and Manifest permissions.
The folders storage permissions apply to also changed
For basic functionality see the example which I think I shared with you before (I think the functionally implemented works on at least all recent versions - but no warranty), I also re-posted yesterday:

For details of how Android behaves on a given version (you won't like this) see its docs.

If you interested in changing the Manifest contents see another discussion from yesterday:

There may (or may not) be another issue:

If you want to access Media (video, pictures) on Android 10 I don't think you can do it via a file based mechanism (this is my understanding, it may be incomplete). I think you have the go via the MediaStore or perhaps ContentResolver (?I don't know) and get a content url. A few weeks ago we discussed Android Share and receiving a content url; getting a content url is the other side of the same process. Please don't complain to me about this, I'm only the messenger. Android is what it is get used to the idea.

I have not tried to do this last part so I do not have an example for you. Everything I know is in the Manifest link above,  in that thread Hendrick is facing a similar issue.

Degenerate Tech

unread,
Dec 4, 2020, 7:13:58 AM12/4/20
to Kivy users support
ii is showing permission denied (run time )..while save some file on android but i have given all permission .

planckp...@gmail.com

unread,
Dec 4, 2020, 11:41:08 AM12/4/20
to Kivy users support
Did the example main.py posted here work for you ?
Reply all
Reply to author
Forward
0 new messages