-
-
Notifications
You must be signed in to change notification settings - Fork 46
App crashes when saving photo on Android 10 devices #245
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
Comments
I get a similar error in Xiaomi Mi9se on Android 10 QKQ, after the photo the application closes |
Same on Pixel 3a and Samsung S20 (both android 10) |
I have the same issue with my recent app. |
I also have the same issue in my redmi k20 image didn't appears and in console it shows JS: Error: cancelled. |
This comment was marked as abuse.
This comment was marked as abuse.
@NathanaelA thanks for response, but would you mind at least adding this note to the plugin home page README.md? TNS 6.5.0 has default target API 29 so apps built with this plugin will by default crash on Android 10. |
@NathanaelA Thank You So much it worked |
@NathanaelA's solution did not work for me. My target API is set to 29, as it is now required by the Play Store, but I cannot get it work. App crashes when trying to take a picture |
Which platform(s) does your issue occur on?
Android 10 (Android 9 and lower seems to work fine), devices that I have tested this issue:
Please, provide the following version numbers that your issue occurs with:
"tns-android"
: 6.5.0Please, tell us how to recreate the issue in as much detail as possible.
Nativescript-camera plugin does not work on Android 10 devices, our clients were complaining mostly about Samsung Galaxy and Xiaomi MI devices. It does not work also on Android 10.
Is there any code involved?
I am attaching simple demo app that is supposed to just take photo and show it in Angular component. App was generated via command
tns create
as Angular Hello world app.tns650.zip
To reproduce issue:
npm ci
(installs exact vesions from package-lock.jsontns platform clean android
tns debug android
On Android 10 emulator, it throws error

JS: Error: cancelled
in the console.On Samsung Galaxy M20, application crashes. See attached GIF video how it behaves on real device:
Error stack:
tns650error.txt
Workaround
I have found out that when targetSdkVersion is set to 28 (not default 29 in TNS 6.5.0) then application works :
The text was updated successfully, but these errors were encountered: