I have a problem in my Cordova/Wikitude application where I try to add a custom button to the AR View to give the user the possibility to close the AR View.
Additionally in the Main Cordova Application I use the the Cordova backbutton event as described here to handle the android backbutton in a custom way.
When the custom close button in the AR View is clicked I set the document.location to "architectsdk://someString" to trigger the "onUrlInvoke" callback where I call the close method of the Wikitide plugin.
So far everything works fine ...
But when I now tab the back button in my app the complete app closes immediately. The callback for the Cordova Backbutton event is not triggered.
I assume that this somehow is related to my custom close functionality in the AR View because when I tab the backbutton in the AR view instead of the custom button, the Ar view closes gracefully and the Cordova Backbutton callback is present.
Can you give me any hint or help with this problem?
- Softwareentwickler -
Stiftung Haus der Geschichte der Bundesrepublik Deutschland
If there is an existing ARchitectWorld loaded(between loadARchitectWorld and close) you can also use WikitudePlugin.setBackButtonCallback.
After WikitudePlugin.close you will have to set your backbutton event listener again.