Fatih Mert Do?ancan
Posts: 0
Joined: Wed Jan 28, 2015 1:00 pm

How to quit application?

Hi guys,

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

How to quit 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/...

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

How to quit application?

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'   
 );
M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

How to quit application?

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

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

How to quit application?

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

Return to “Issues”