I am looking for a solution regarding loading images from internal storage file manager via my kivy application.
for testing,i need to select the image from internal storage and then convert it into gray scale image by using opencv.
I have tried filechooserlistview,but however i could not access my internal storage.
I have also added below mentioned line in my buildozer.spec file.
android.permissions = READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE
i'm searching for this solution for the last two days but i didn't get any proper result yet.
Please share the code if anything you have.
Thanks in advance
解决方案
In newer Android systems, the buildozer permission request for accessing the storage is not working with kivy.
To acquire these permissions you have to ask for them in your app by:
from android.permissions import request_permissions, Permission
request_permissions([Permission.WRITE_EXTERNAL_STORAGE,
Permission.READ_EXTERNAL_STORAGE])
... and the user will be asked to your App to access the storage.
The android library is included in the buildozer builds, so that request is all you have to do...
To get the internal storage path:
from android.storage import primary_external_storage_path
SD_CARD = primary_external_storage_path()
Note that this is the virtual (internal) SD card of the system.