-
Notifications
You must be signed in to change notification settings - Fork 425
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
Plyer Native camera Shows error #812
Comments
Maybe consider using Camera4Kivy? |
Here i don't need Camera4Kivy . Native camera is enough |
could you tell me what is the problem ? |
I don't remember all the details, but the design of Plyer Camera uses obsolete apis on Android > 10. If you want a camera Intent, probably best not to use Plyer and to write your own. For example Plyer uses a "file URI" https://github.com/kivy/plyer/blob/master/plyer/platforms/android/camera.py#L23 this type of URI is no longer available in the api. The issue is as far as I remember bigger than just that example line. You could try making a local copy and replacing the file URI with a valid "content URI" to shared storage (note this does not contain a file path but contains an Android generated file reference in a database). But I seem to remember perhaps there is some other issue behind that, perhaps the details of the Intent changed? For me looking at Plyer Camera was a long time ago in a distant galaxy so I got nothing specific to offer. |
@RobertFlatt solved using file provider . Are you in Kivy's discord server ? |
@Sahil-pixel I'm not active in things Kivy, occasionally I drive by and look in the window. |
Testing on Android 13
File "jnius/jnius_export_class.pxi", line 1163, in jnius.jnius.JavaMultipleMethod.call
07-18 19:54:04.338 28943 29039 I python : File "jnius/jnius_export_class.pxi", line 877, in jnius.jnius.JavaMethod.call
07-18 19:54:04.338 28943 29039 I python : File "jnius/jnius_export_class.pxi", line 971, in jnius.jnius.JavaMethod.call_method
07-18 19:54:04.338 28943 29039 I python : File "jnius/jnius_utils.pxi", line 79, in jnius.jnius.check_exception
07-18 19:54:04.339 28943 29039 I python : jnius.jnius.JavaException: JVM exception occurred: file://my.org.test/newfile exposed beyond app through ClipData.Item.getUri() android.os.FileUriExposedException
07-18 19:54:04.339 28943 29039 I python : Python for android ended.
The text was updated successfully, but these errors were encountered: