Cordova : close application (not exit)

2 posts, 0 answers
  1. Saluts92
    Saluts92 avatar
    7 posts
    Member since:
    Mar 2016

    Posted 14 Apr Link to this post

    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
  2. Martin
    Admin
    Martin avatar
    67 posts

    Posted 18 Apr Link to this post

    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.

     
Back to Top