Hi guys,
I created a "Exit" button. Acutally, Is it must?
Or, How I can quiting from my application?
Hi guys,
I created a "Exit" button. Acutally, Is it must?
Or, How I can quiting from my application?
Fatih,
To have or not to have an exit button it's up to you to decide (in fact a lot of apps don't have such a button.) Also please look st these posts, they should be helpful:
https://getsatisfaction.com/apperyio/...
https://getsatisfaction.com/apperyio/...
Well, there is one thing to note - there is no exit thingy on iOS. So you may want to check the mobile OS before executing this command. On Android you can do it this way
Add a Button...and have the following JS code for that button
//
function onConfirmQuit(button){
if(button == "1"){
navigator.app.exitApp(); // This exits the App (But only on Android)
}
}
Code: Select all
navigator.notification.confirm(
'Do you want to quit',
onConfirmQuit,
'QUIT TITLE',
'OK,Cancel'
);What I do is to do a OS check...and if it is Android I show the exit button. If it is iOS I hide the button
on IOS - you can also consider an alternative approach - if you have a login screen... return the user there with the quit button - and if you use a datasource - run the logout() service.... with a message "You've been logged out " ....its an option that my user community wanted on an app I just submitted..