简体   繁体   English

Android 2.3X将应用杀入后台

[英]Android 2.3X kills Apps into the Background

I always used Android 2.2 for my Apps. 我的应用程式一向使用Android 2.2。 But currently I upgraded to Android 2.3.X Gingerbread. 但目前我已升级到Android 2.3.X Gingerbread。 So if I start my App and go back to the android "desktop", the app is kill by 3-4 Minutes. 因此,如果我启动我的应用程序并返回到Android“桌面”,则该应用程序将被3-4分钟杀死。

I think it will be killed after some minutes inactivity, but I need to run it in background to read some mobile status. 我认为它会在闲置几分钟后被杀死,但是我需要在后台运行它以读取某些移动状态。

How can I set my App as a "Background" App, so that Android will not longer kill it? 如何将我的应用设置为“背景”应用,以便Android不再将其杀死?

Thanks for Help... 感谢帮助...

Regards, Rookee 问候,洛克

To run an application in the background it must be of type "Service". 要在后台运行应用程序,其类型必须为“服务”。 You have to register a service and it will run in your device forever. 您必须注册一个服务,它将永久在您的设备中运行。 For more info, Android Services 有关更多信息,请参阅Android服务

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM