Closing app on android 6.0

Asked

Viewed 50 times

0

How do I get the button to exit in an application with phonegap. We have tried all available forms and in no way the command executes the "exit".

  • https://stackoverflow.com/questions/12297525/exit-from-app-when-click-button-in-android-phonegap see if this helps

  • Edit your question and put at least your last try.

1 answer

0

I always wear it like this and it always works:

<a href="#" onClick="fechaMe();" data-role="button">Fechar App</a>

Javascript

function fechaMe() {
    navigator.app.exitApp();
}
  • 0 vote against Accept I’ve tried and look at the message that appears... util.js:163 Uncaught Typeerror: Cannot read Property 'exitApp' of Undefined at closeAplicative (util.js:163) at Htmldivelement.onclick (travel.html:357)

  • @Mkreusch included Cordova in the document header?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.