Reputation: 9926
I created an application that contain a Service
that start from button click of Activity
.
But I want to create a new application that doing the same as the last one - but don't have any GUI interface => that mean without any Activity
.
I want to make the application to start on device boot and never stop (until the device is shutdown) .
How to do it ? Is there any way ?
Upvotes: 0
Views: 2993
Reputation: 19949
How to do it ?
By using Context.startService()
or Context.bindService()
methods.
where Context
might be Activity
, Application
, argument of the onReceive()
method of BroadcastReceiver
etc.
Upvotes: 2