I'd like to have some code be notified of any incoming and outgoing voice calls. I need to grab all the following:
- If it was an incoming or outgoing call
- Number dialed, or incoming caller-id phone number
- Duration of call, or if it was a missed call
It would also be really slick if I could get more contact info, specifically the contact name, if the phone number matches up to someone in the phone's contacts list, but that part is optional.
I need my code to get this information pretty much as soon as a call has ended. Maybe I'm just not searching for the correct terms but I'm having a real hard time finding any examples of how I would accomplish this.
If someone could provide a code example that accomplishes this, along with the permissions and any sort of broadcast receiver type of setup I would need in the manifest file, that would be great.