Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

Phonegap exit button

I have some code attached to an exit button:

prenavigator.notification.confirm(
'Press Exit to terminate application', // message
function(buttonindex){if (buttonindex === 1) {navigator.app.exitApp();}}, // callback to invoke with index of button pressed
'Exit Application', // title
['Exit','Continue'] // buttonLabels
);/pre

I have used this code in previous apps, but it doesn't seem to do anything, I don't get the cordova confirm notification.

I tried it through the android appery tester app and it works ok there, but not as a standalone app

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Phonegap exit button

Hello Terry,

Please try to debug your app remotely using Weinre debugger (https://docs.appery.io/docs/weinre-de...).

Please check if there are any errors in the Weinre console

Terry Gilliver
Posts: 0
Joined: Fri Apr 18, 2014 8:45 pm

Phonegap exit button

Ok Tested With Weinre debugging and no errors were shown on the console.

Android binary settings are:

Image

Device is a Tesco Hudl 2
Android 5.1
Bios BayTrail 5.04.48.0056.e

The App is called ADI Buddy and is shared with support.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Phonegap exit button

The JS code, provided by you works fine on my Android device.
Could you test it on the blank app?

Return to “Issues”