user1269553
user1269553

Reputation:

Is it possible to start an Android Service from a BroadcastReceiver?

I want to start a Service from a BroadcastReceiver in Android. Is it possible? Can anyone please tell me how a Service is started in a BroadcastReceiver?

Upvotes: 0

Views: 40

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006584

in android it is possible

Yes.

Can anyone please tell how Service being started in broadcast receiver?

Call startService() on the Context passed into your onReceive() method of your BroadcastReceiver.

Upvotes: 2

Related Questions