'Do You want to Close the Application?', // message
onConfirm, // callback to invoke with index of button pressed
'Close', // title
'No,Yes' // buttonLabels
);
return false;
}
function onConfirm(button) {
if (button==2) navigator.app.exitApp();
}
but it din't work... I have tested other PhoneGap methods with no success..
Could you please help me to sort this?
Thank you for you help
A
Andreas Fötschl
said
almost 11 years ago
Hi there!
You must know that PhoneGap commands are not working inside an ARchitect-HTML file. You can add listeners in any JS inside the SampleProject's "www"-folder according PhoneGaps documentation Whereat the "world"-folder contains all Wikitude Related components that work as documented in the "Library Reference" you can find in the ARchitect Tools.zip.
Cheers, Andi
S
Salvo Esposito
said
almost 11 years ago
Hi Andi,
even iuf I add this code in the event listener on the idex.html page ...
what happen then is that...
the wikitude plugin close down, and the event listener works for the index.html page.
how can I avoid this?
Thanks
A
Andreas Fötschl
said
almost 11 years ago
Hi there!
Now I understand ;-)
Please overwrite backbutton behavior of the WikitudePlugin's Android-Backbutton behavior (compare line #44 and #81 in WikitudePlugin.js for Android :
/* your very own backbutton implementation, if not set: AR view is closed */
function myBackbuttonCallback(){ // alert("user pressed back-button"); };
/*somewhere in your PhoneGap's JS code */ WikitudePlugin.onPressedBackButton(myBackbuttonCallback);
Salvo Esposito