tags:

views:

131

answers:

1

I would like to launch an activity at the end of a phone call. Could not find any reference to that. How can I do it?

+1  A: 

I haven't tried this, but I would assume you could have some service running(always on in background), that utilizes the PhoneStateListener. You could then listen for LISTEN_CALL_STATE which says it "Listen for changes to the device call state". I would assume this would fire when a call starts, stops, etc. You could then launch your activity from the service when you receive a message that a call ended.

Note you would probably have to track the states, and no when you are in CALL_STATE_OFFHOOK and go to CALL_STATE_IDLE that the call ended.

broschb