Friday, 6 October 2017

Cordova Exit from App

Code to exit from  mobile app using the JQuery Code (Cordova exit app event).

Code for exit from app

  exitFromApp: function () {

        if (navigator.app) {
            navigator.app.exitApp();
        }
        else if (navigator.device) {
            navigator.device.exitApp();
        }

        return false;

    },


Exit from app when click button in android phonegap?

Calling Method

<button name="btnExit" style="background-color:transparent;color: #f82284 !important;font-size:18px;border:0" onclick="app.exitFromApp()" id="btnExit">Exit</button>

No comments:

Post a Comment