Page 1 of 1

How to quit application?

Posted: Wed Jan 28, 2015 1:02 pm
by Fatih Mert Do?ancan

Hi guys,

I created a "Exit" button. Acutally, Is it must?
Or, How I can quiting from my application?


How to quit application?

Posted: Wed Jan 28, 2015 1:19 pm
by Evgene Karachevtsev

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/...


How to quit application?

Posted: Wed Jan 28, 2015 1:22 pm
by M&M

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'   
 );

How to quit application?

Posted: Wed Jan 28, 2015 1:23 pm
by M&M

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


How to quit application?

Posted: Fri Jan 30, 2015 4:23 am
by Bruce Stuart

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..