How to exit Meteor Android app


#1

Hi everyone,
I’m very eager to learn how to make a cross-platform app with Meteor, have been playing around with the sample apps todos and local market.
My question is that how can we exit the app via a Exit button or by using the Back button of the phone. For now, in the sample apps, pressing Back button on the phone only refresh the home page.
Is the any way to do this properly in Meteor?

Regards,
Hieu Tang


#3

No, node.js APIs will not exit your mobile app, this is not correct.

To exit your mobile app, you can use the Cordova API navigator.app.exitApp(), see details here: http://stackoverflow.com/questions/12338337/phonegap-android-exit-on-backbutton


#4

Thanks Slava. It works!