You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.
When a code is scanned it should return to the app with the right callbackContext. This can be resolved by overriding the onRestoreStateForActivityResult method on the plugin and set the callbackContext object. This way the app won't crash and the result will be available on the on resume event. I will make a pull-request with this solution.
If the phone settings are set to kill background tasks or there is any other cleaner that kills the main app activity, then the plugins returns to the app with a null object and crashes the app.
Reproduce Scenario (including but not limited to)
Any app with the scanner in Android.
Steps to Reproduce
In any phone, in developer options set "Don't keep activities" to true. Now when scanning a code you won't be able to get the result in the app once it opens again.
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Any Android, tested on 5.0.
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Any Vendor, tested on an LG G3.
Cordova CLI version and cordova platform version
Any version of cordova, tested on 4.4.2.
Plugin version
cordova plugin version | grep phonegap-plugin-barcodescanner 6.0.1
The text was updated successfully, but these errors were encountered:
Expected Behaviour
When a code is scanned it should return to the app with the right callbackContext. This can be resolved by overriding the
onRestoreStateForActivityResult
method on the plugin and set the callbackContext object. This way the app won't crash and the result will be available on the on resume event. I will make a pull-request with this solution.Actual Behaviour
If the phone settings are set to kill background tasks or there is any other cleaner that kills the main app activity, then the plugins returns to the app with a null object and crashes the app.
Reproduce Scenario (including but not limited to)
Any app with the scanner in Android.
Steps to Reproduce
In any phone, in developer options set "Don't keep activities" to true. Now when scanning a code you won't be able to get the result in the app once it opens again.
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
Any Android, tested on 5.0.
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
Any Vendor, tested on an LG G3.
Cordova CLI version and cordova platform version
Plugin version
The text was updated successfully, but these errors were encountered: