That is more a stackoverflow question: https://stackoverflow.com/questions/23079724/how-to-exit-an-application-programmatically-on-phonegap-3-4-0
Regards,
Ronald