[英]how to make an application in android run even if the user destroyed it?
how to make an application\\service in android run even if the user destroyed it? 即使用户销毁了它,如何使android中的application \\ service运行?
I need that one class will work even if the user will close the application how can I do that? 即使用户将关闭应用程序,我也需要一个类才能工作该怎么办?
how to make an application\\service in android run even if the user distroied it?
即使用户销毁,如何使android中的application \\ service运行?
If by "distroied" you mean the user force-stopped the application through the Settings application, your application will not run again until the user manually launches an activity of yours (eg, through the home screen launcher), starting in Android 3.1. 如果“发布”是指用户通过“设置”应用程序强制停止了该应用程序,则该应用程序将不会再次运行,直到用户手动启动您的活动(例如,通过主屏幕启动器)(从Android 3.1开始)。
If by "distroied" you mean the user killed the application using a "task killer", your application will not run again until the user manually launches an activity of yours (eg, through the home screen launcher), at least through Android 2.1. 如果“发布”是指用户使用“任务杀手”杀死了该应用程序,则该应用程序将不会再次运行,直到用户手动启动您的活动(例如,通过主屏幕启动器),至少是通过Android 2.1。
I need that one class will work even if the user will close tha application how can I do that?
即使用户将关闭应用程序,我也需要一个类能正常工作吗?
Redesign your application to not "need that one class will work even if the user will close tha application". 重新设计您的应用程序,以免“即使用户关闭该应用程序也不需要一个类工作”。 Users are in control of their phones -- you are not.
用户可以控制自己的手机,而您却没有。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.