Android - How to run the Service Component of an application at startup [duplicate]
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.
精彩评论