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.
精彩评论