I\'d like to have some code be notified of any incoming and outgoing voice calls. I need to grab all the following:
A PhoneStateListener and the CallLog content provider will give you most, if not all, of what you need.
You should be able to directly watch outgoing calls by listening for android.intent.action.NEW_OUTGOING_CALL
broadcast events, by setting the android.permission.PROCESS_OUTGOING_CALLS
permission in your manifest.
I imagine this should work for other devices; at least on my HTC Hero this gives me an Intent
full of extras including the phone number being called, the contact's name plus URIs for the contact and individual number being called.
As for getting full information on incoming or missed calls (and indeed outgoing calls), I believe the solution as Mark mentions is to watch the CallLog
content provider for changes, or poll after the relevant PhoneStateListener
events have been fired.