开发者

Android - How to run the Service Component of an application at startup [duplicate]

开发者 https://www.devze.com 2023-02-21 11:04 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: Trying to start a service on boot on Android
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Trying to start a service on boot on Android

I am writing an application that has two components, a frontend activity and a background service. The activity will allow one to specify options such as an update interval for the background service to use.

The background service spawns and manages several threads involved in pulling the user's location and sending it to a server.

I would like the "service" component of the application to run at startup. Since the activity is only used to set some settings the service could run using predefined settings (stored from last input). If the user would like to change them then he can initiate the activity.

Any examples on how to do this?

(Think advanced task killer. How does this开发者_如何学编程 run at startup?)


I believe this question is similar to #2784441.

0

精彩评论

暂无评论...
验证码 换一张
取 消