I'm currently doing an android application requiring a background service running in another thread. The issue is I want to start it after BOOT_COMPLETE, and don't want it to block my main thread.
Anyone has any idea?
I'm currently doing an android application requiring a background service running in another thread. The issue is I want to start it after BOOT_COMPLETE, and don't want it to block my main thread.
Anyone has any idea?
You have to register a BroadcastReceiver with action BOOT_COMPLETE.
In the onReceive() method of receiver you have to start your Service by using the startActivity() method.
Look up a broadcast receiver... that is all you need.