Search code examples
pythonandroidkivykivy-language

Loading images from internal storage kivy python


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


Solution

  • Try with path /storage/emulated/0/

    As an example, mention it in your .kv file

    #:import platform kivy.utils.platform
    FileChooserListView:
        rootpath: '/storage/emulated/0/' if platform == 'android' else '/'