Android上带有Angular 2的Nativescript,如何关闭我的应用程序? [英] Nativescript with Angular 2 on Android, how to close my app?

查看:130
本文介绍了Android上带有Angular 2的Nativescript,如何关闭我的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个按钮.当您点击按钮时,应用程序将关闭,并进入主屏幕.不需要真正关闭应用程序,只需进入主屏幕即可.

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.

我该如何实现?

推荐答案

在iOS上,操作系统不允许您以编程方式关闭该应用.

On iOS you're not allowed by the operating system to programmatically close the app.

我不确定这在Android上是否是一种很好的做法,但是在StackOverflow上已经多次询问并回答了它.

I'm not sure it's a good practice on Android, but it has been asked and answered many times on StackOverflow.

这篇关于Android上带有Angular 2的Nativescript,如何关闭我的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆