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
When the barcode overlay screen is opened and I click on the android back button it closes the screen as well as it calls the android: back event of the previous window screen because of that it close the current screen from where the barcode is called as well as the overlay barcode screen. It shifts to 1 step back of android button on the window.
It works fine on other Android OS version lower the PIE. But especially on Pie, it seems to happen.
The text was updated successfully, but these errors were encountered:
not sure if that is a problem with ti.barcode. You could check in your android:back event if the barcode scanner is open and then prevent it from closing.
I just ran into this problem. Pressing the Android OS back button closed both the overlay and bubbled up and closed the app. May not be the best way to solve this, but here's what I did:
//In alloy.js, set a global var:
Alloy.Globals.barcodeGoback = '';
//In index.js, button's func that calls up Ti.Barcode scanner:
function callCamera() {
Alloy.Globals.barcodeGoback = '1'; //change var to 1 to signal it needs closed
Barcode.capture({
animate: true,
overlay: $.overlay,
showCancel: false,
showRectangle: false,
keepOpen: false,
preventRotation: true,
acceptedFormats: [
Barcode.FORMAT_QR_CODE,
Barcode.FORMAT_DATA_MATRIX
]
});
//In index.js, add an event listener for androidback that closes only the overlay:
$.appWindow.addEventListener('androidback', function(){
if (Alloy.Globals.barcodeGoback == 1) { $.yourView.remove($.overlay); //remove the overlay
Alloy.Globals.barcodeGoback = '0'; //change the global var back to 0
} else if.... //add more if needed
});
When the barcode overlay screen is opened and I click on the android back button it closes the screen as well as it calls the android: back event of the previous window screen because of that it close the current screen from where the barcode is called as well as the overlay barcode screen. It shifts to 1 step back of android button on the window.
It works fine on other Android OS version lower the PIE. But especially on Pie, it seems to happen.
The text was updated successfully, but these errors were encountered: