cordova-plugin-iosexitapp

Implements navigator.app.exitApp on iOS, WP8, Android

Usage no npm install needed!

<script type="module">
  import cordovaPluginIosexitapp from 'https://cdn.skypack.dev/cordova-plugin-iosexitapp';
</script>

README

cordova-plugin-exitapp

This plugin adds the ability to programmatically close an app on Android or Windows Phone 8.

Installation

Plugin id: cordova.custom.plugins.exitapp

To install this plugin, follow the Command-line Interface Guide.

If you are not using the Cordova Command-line Interface, follow Using Plugman to Manage Plugins.

Usage

confirmed = function(buttonIndex) { if(buttonIndex == 1) { console.log("navigator.app.exitApp"); navigator.app.exitApp(); } }

onTouch = function() { navigator.notification.confirm('', confirmed, 'Exit?'); }