You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4 年之前
12345678910111213141516171819202122232425
  1. cordova-plugin-exitapp
  2. ----------------------
  3. This plugin adds the ability to programmatically close an app on Android or Windows Phone 8.
  4. ## Installation
  5. Plugin id: cordova.custom.plugins.exitapp
  6. To install this plugin, follow the [Command-line Interface Guide](http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-line%20Interface).
  7. If you are not using the Cordova Command-line Interface, follow [Using Plugman to Manage Plugins](http://cordova.apache.org/docs/en/edge/plugin_ref_plugman.md.html).
  8. ## Usage
  9. confirmed = function(buttonIndex) {
  10. if(buttonIndex == 1) {
  11. console.log("navigator.app.exitApp");
  12. navigator.app.exitApp();
  13. }
  14. }
  15. onTouch = function() {
  16. navigator.notification.confirm('', confirmed, 'Exit?');
  17. }