开发者

Notify a service from a PhoneStateListener

I have built an application that l开发者_JAVA技巧isten to call state changes, and I want to notify a service when the call_state became IDLE.

All the components I have are functional, I just need to notify (not start) a service for this.

What's the correct practice, maybe using AIDL?

Because, in a PhoneStateListener, I can't bind to a service. Do I have to start an activity for that?


I'd think you'd be better off sending your service a broadcast intent than trying to bind to it.


When you want to notify your service you will need to call though to its process via AIDL.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜