开发者

Notify a service from a PhoneStateListener

开发者 https://www.devze.com 2022-12-23 06:24 出处:网络
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.

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

精彩评论

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

关注公众号