[英]Nativescript with Angular 2 on Android, how to close my app?
I would like a button. 我想要一个按钮。 When you tap the button, the application closes, and go to home screen.
当您点击按钮时,应用程序将关闭,并进入主屏幕。 Not needed to really close the app, just go to home screen.
无需真正关闭应用程序,只需进入主屏幕即可。
How can I achieve this? 我该如何实现?
On iOS you're not allowed by the operating system to programmatically close the app. 在iOS上,操作系统不允许您以编程方式关闭该应用。
I'm not sure it's a good practice on Android, but it has been asked and answered many times on StackOverflow. 我不确定这在Android上是否是个好习惯,但是在StackOverflow上已经多次询问和回答了它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.