简体   繁体   English

即使用户销毁了该如何在android中运行应用程序?

[英]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.

相关问题 即使活动在android中被破坏,如何使按钮类型的SOS起作用 - How to make the button kind of SOS functional even if the activity is destroyed in android 即使活动和应用程序被破坏,如何继续继续上传任务? - How to keep continue uploading task even when activity and application destroyed? Android - 即使方法完成后侦听器对象也不会被销毁? - Android - How listener object is not destroyed even after the method is finished? 如何获取用户在android中运行应用程序的“最后”日期或时间? - How to get the “last” date or time that the user has run the application in android? android studio; 如何使应用程序记录用户活动 - android studio; how to make application log user activity 即使没有用户打开应用程序,如何使代码在 21:00 运行 - how to make the code that runs at 21:00 even though no user opens the application android crashlytics检测应用程序突然被破坏并消失了 - android crashlytics to detect application suddenly destroyed and disappeared 仅当我的应用程序处于活动状态且在后台运行且未被破坏时,如何在后台运行 BLE 扫描? - How do I run a BLE scan in the background only if my application is alive and in the background as well and not destroyed? 如何使Android应用程序在其他应用程序之上运行某些UI元素? - How to make an Android application to run some UI element above other application? 我如何检测我的 android 应用程序是否被销毁/暂停/停止而不会失败? - How can I detect If my android application is Destroyed/Paused/Stopped without fail?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM