This prevent any use of back button and log a line on button push.
- Deploy and launch the app
- Use the back button just after startup, as expected a log is written
- launch an architect world and use it (tap on it)
- use the back button to return to the main menu
- push the back button, app is exited whereas it should not.
Interesting behaviour to note : If the architect world is launched but not interacted with (no tap on the view, and only the back button is pushed) the backbutton keeps its expected behaviour.
Thanks for your feedback on this.
over 6 years ago
For technical reason we have to span the AR-View right on top of the PhoneGap view. Back-button is intercepted in native android so avoid timing issues caused by PhoneGap JS-call delays, which may cause unexpected app behavior.
Unfortunately we have to manually focus the user input to the AR-View and give it back to the PhoneGap View. For some reason this behavior is different on Android 4.4 than on Android <KitKat. We are aware of this issue and will handle this in an upcoming plugin version separately. Meanwhile you can customize the backbutton behavior directly in the WikitudePlugin.java file.
Kind regards, Andreas
about 4 years ago
Hi, Today we released version 5.2 of our SDK including updates to our extension. The latest Wikitude Cordova plugin now includes a callback which is called once our augmented reality view/plugin closes. Please have a look at our example application on how to set the new back button callback.