0

I need to start an action after a call has ended. No button clicks or anything like that, I need it for both incoming and outgoing calls. I understand I have to deal with PHONE_STATE_IDLE. Does this mean I have to have listeners to listen to incoming and outgoing calls, and when they start and finally when the pgone goes IDLE after that?

Or is there a simpler way. I checked the Telephony docs from Android, but the 3 PHONE_STATE cases mentioned there are a bit vague for me.

Also , most answers related to this are both old and lead to a dead-end (for me, atleast). Anything concerning Marshmallow, or better yet Oreo, would be of great help.

C Forge
  • 215
  • 1
  • 8
  • https://stackoverflow.com/questions/15563921/how-to-detect-incoming-calls-in-an-android-device/15564021#15564021 My code there detects calls ending (as well as starting). The only change needed is runtime permissions, and that you need to register some of those listeners actively now, rather than passively in the manifest – Gabe Sechan Oct 21 '18 at 00:38
  • @GabeSechan that code is extremely amazing, and the final simplified class you created is just magic. Thank you. wish i could upvote it – C Forge Oct 21 '18 at 00:45

0 Answers0