I'm coding an Android app using Kivy, and would like the app to write to the android filesystem, some PUBLIC directory/files.
Currently, if my app writes a file (using Python), the file CAN be read by the android local File Manager, but CANNOT be read by my computer mtp (these files don't appear in the InternalStorage). The adb shell CAN see the files though.
[EDIT] The solution could be to scan the files for mtp using MediaScannerConnection with Pyjnius, however as shown in my next answer, it didn't work for me. [/EDIT]
It seems to me that I'm looking for an equivalent of the Java getSharedPreferences described here : http://developer.android.com/guide/topics/security/permissions.html.
I thought that there is a similar option in the buildozer spec : the android.private_storage field described here : https://raw.githubusercontent.com/kivy/buildozer/master/buildozer/default.spec.
However, I'm not getting this to work... maybe I'm not using correctly the buildozer command : after settings in the spec "android.private_storage = False", I tried several commands like "buildozer android release --dir public my_dir" , or "buildozer android release --public my_dir", etc... , without success.