Thiago Caramelo
Thiago Caramelo

Reputation: 309

Incoming call starts a Service

I’d like to start a service by using PHONE_STATE when an incoming call gets to the phone. After that, my service is intended to connect to a remote XMPP server and show any new messages to the user. That’s easy to do but is there a better approach of doing so ?

I appreciate any help or ideas.

Upvotes: 2

Views: 1983

Answers (1)

FoamyGuy
FoamyGuy

Reputation: 46846

check out this question to learn how to get a call back when the phone is ringing. Then you'll just start your service from inside that callback.

Upvotes: 1

Related Questions