Android run application in background
I have an android app that has a ui but also has several service classes
that run in the background and do things like monitor location, texts,
ect. The services are initiated when the app starts from my main activity
(after the configuration is loaded from a web server- initialed by main
activity's "onCreate"). However, I want this configuration to be loaded
and the services to start when the phone is turned on, and since the main
activity initially doesn't launch until the user tells it to, the services
are not started until this point. Does my main activity (one specified in
launcher) need to extend something other than "activity" so that these web
service calls can be made and services started as soon as phone turned on
though not necessarily showing the ui? Thanks
No comments:
Post a Comment