Hello.
Please what’s the best way to use ons.enableDeviceBackButtonHandler()?
Should it be placed in the callback function for ons.ready() ?
E.g.
ons.ready(function () {
ons.enableDeviceBackButtonHandler();
ons.setDefaultDeviceBackButtonListener(function(){});
});
Furthermore, since ons.enableDeviceBackButtonHandler() relies on cordova.js should i wait for the cordova deviceready event before calling this method??
Please, i ask this question because the documentation is not clear on this; and in my apps, i always end up with a race condition which makes ons.enableDeviceBackButtonHandler() not capture the device backbutton event.
Thanks for your help and attention