This is a migrated thread and some comments may be shown as answers.

Cordova : close application (not exit)

1 Answer 1000 Views
Apache Cordova
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Saluts92
Top achievements
Rank 1
Saluts92 asked on 14 Apr 2016, 06:30 AM
Hello,

I want to close my application. I can not find the instruction.
I tried navigator.app.exitApp (); this puts my application in the background but does not close.
Is it possible ? if so how please?

Thank you

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 18 Apr 2016, 12:34 PM

Hi Saluts92,

Both Android and iOS platforms embrace the concept that mobile apps are not exited but moved from one state (active, in the foreground) to another (inactive, in the background) and if the OS is short on resources it may destroy/stop an inactive apps. This provides a better user experience as the app will load quicker if it is in the background vs. when it is cold started. Therefore both iOS and Android does not provide an API to terminate an application.

The states that an app goes through in iOS and Android differ slightly, please review them in details:
iOS app life cycle 
Android app life cycle.

I hope this helps.


Regards,
Martin
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
Apache Cordova
Asked by
Saluts92
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or