Is there any sample application which demonstrates the capabilities of Telephony API of android? I am interested in getting the call notifications / caller number etc(I understand its doable with PhoneStateListener). Also, Is it possible for 3rd party application to change the incoming call window / outgoing call window (basically to give the user an extra button to search the incoming number from a REST service) ?
Any useful links or sample application would be very much helpful. Any suggestions ?
PhoneStateListener tells your app about phone activity. Here’s some sample code from one of my apps that pauses music when the phone is active:
Create and start the listener in onCreate via:
Stop the listener in onDestroy with:
As for modifying the incoming call dialog the best suggestion I’ve found is to use a short delay followed by a custom toast message (delay so that your toast appears “above” the incoming call dialog).