-
Notifications
You must be signed in to change notification settings - Fork 426
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
Kivy filechooser by plyer not working properly #683
Comments
I'm complementing the question with a part of my code: filechooser.open_file(on_selection=self.path ,multiple = False,filters=[["Image", "*png", "*jpg","*jpeg"]]) |
Plyer is not well supported, I don't think filechooser works on newer Android versions. On newer Android versions shared storage is not a file system, a Python app can't get a filepath to open() Here are two examples containing Android Chooser usage without using Plyer |
Its will help you. https://github.com/Neizvestnyj/cross-platform-image-picker/blob/master/main.py Use file_path from my solution (its local file copy) |
Hello, @RobertFlatt and @Neizvestnyj, thanks for the suggestions.
I know that this solution is not the most ideal, but it solves many problems. Mainly for those who need to select a photo and get the path. |
I am attaching the video for better understanding. Notice in the first case that I selected the photo in android's native selector. And in the second case I opened the gallery and selected the photo from it. WhatsApp.Video.2022-06-14.at.22.27.13.mp4 |
Hello everyone from the kivy community, all the problems I've had so far I've been able to solve through the community, I'm very grateful for that.
I'm developing an app in kivy, everything is working correctly, but I have a specific problem when I'm using the native android selector (filechooser by plyer).
I'm using:
kivy==2.1.0
plyer==2.0.0
I need to select an image (.png, .jpg...) when I browse the native android selector and select an image file I get the path correctly ["/storage/.../image.jpg"]. But when I click on the "gallery" and select the image, I get an empty list [[]]. I will show the problem in detail.
WhatsApp.Video.2022-06-09.at.16.56.01.mp4
Note that in the first case, I selected the images that are appearing in "recent" on the first screen of the android selector, it also works if I browse other folders in that same selector. So I get the correct path of the file ["/storage/.../IMG-20220530-WA0007.jpg"].
WhatsApp.Video.2022-06-09.at.16.55.55.mp4
Now in the second case, when I select the "Gallery" in the suggestions, the selector opens another screen and when I select the desired image I get an empty list [[]]. This problem also happened on three other smartphones.
Anyone had a similar problem? is there any way to solve this problem? can i remove these suggestions from the selector?
Where can I find the plyer/filechooser module in my .buildozer file?
I will apologize because my app is being developed in Portuguese. Thanks !!!
The text was updated successfully, but these errors were encountered: