[Barcode Scanner Plugin] Avoid exiting the app when clicking on Android's back button

Forge Component
(10)
Published on 2018-11-14 by Leonardo Fernandes
10 votes
Published on 2018-11-14 by Leonardo Fernandes

When I'm using an Android and I click the Android's back button, the application is closed. Is there any way to redirect it to the previous app screen instead of closing the app?


Thanks.

Hi António,

The quickest fix that I could find was to do a check if the barcode result is empty, and then do a transition to the current screen.  This is obviously not an optimal solution, because everything in the DOM is reset which would be undesirable in most cases.  My suspicion is that something in the cordova plugin could be causing the issue.

I will however be checking if I can find anything else.

Kind regards,

Dylan