On Tue, Sep 28, 2010 at 7:36 AM, David_Fisher <[email protected]> wrote: > Hi, how should I create a service that would keep on running in the > Background and listen for incoming and outgoing calls? I don't want > the service to die at any point in time. I have created a Broadcast > Receiver in my service class that is set for > ACTION_PHONE_STATE_CHANGED action. In my BroadcastReceiver, I have set > up a PhoneStateListener that would listen for changes in phone states. > Is this the right approach?
That is redundant. ACTION_PHONE_STATE_CHANGED reports the same events as the PhoneStateListener. Just use the ACTION_PHONE_STATE_CHANGED BroadcastReceiver. You should not need a Service. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 3.0.1 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

