Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个带有phonegap(cordova 2.1)的android应用程序,我希望用户能够通过单击菜单按钮完全关闭应用程序。我将事件设置为使用 navigator.app.exitApp() 但这似乎只是关闭了窗口,并且应用程序继续在后台运行并且音乐仍在播放,需要强制关闭。我还在 mainAcitvity 文件中将布尔值“keepRunning”设置为 false。
有人遇到过这个问题吗?
请将此方法称为 onclick 按钮
函数 exitFromApp() { navigator.app.exitApp(); }