使服务不断运行。 [英] Making a service run constantly.

查看:68
本文介绍了使服务不断运行。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨。

我正处于创建一个应该花99%的时间在后台运行的android项目的开始阶段。用户应该能够选择一些选项,然后退出应用程序,应用程序只是在后台运行它做事情。用户在main_activity中选择的选项应该会改变服务行为。







可以有人为我提供了解决这个问题的正确方法吗?



谢谢

Hi.
I am in the starting phase of creating an android project that is supposed to spend 99% of its time running in the background. The user is supposed to be able to choose some options and then exit the application with the application just runnin in the background doing its thing. The options the user picks in the main_activity are supposed to change the service behaviour.



Can someone provide me with the right way to approach this?

Thanks

推荐答案

请参阅此 [ LINK ]了解如何创建后台服务。我希望你提供用户选择一些选项没有问题。
Please refer to this [LINK] to understand how to create a background service. I hope you have no problems with providing user to choose some option.


这篇关于使服务不断运行。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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