5

I wanted to know if there is any definitive way to know if the call is put on hold by the receiver on the receiver side only.

Now I checked the Telephony documentation, and this shows that there are three states for a call :

  1. CALL_STATE_IDLE: When no call activity is there
  2. CALL_STATE_RINGING: When a new call is ringing and waiting to be taken up.
  3. CALL_STATE_OFFHOOK: At least one call exists that is dialing, active, or on hold, and no calls are ringing or waiting.

Here lies the problem, OFFHOOK takes the active and hold state as one. There seems to be no way to distinguish between them. But an interesting observation I made was that dialler recieves a notification when the call is retrieved from hold, that means there exists some way to know the difference. Hence, I would be obliged if you assist me in finding that way.

Kara
  • 6,115
  • 16
  • 50
  • 57
DevangM
  • 63
  • 3
  • 9
  • 1
    You can find more detail against various call status even `HOLD` under broadcast action `ACTION_PRECISE_CALL_STATE_CHANGED` in https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/telephony/java/android/telephony/TelephonyManager.java – Vikalp Patel Jul 19 '14 at 12:00
  • this link might help you http://codingaffairs.blogspot.com/2016/02/how-to-read-precise-state-of-outgoing.html – Developine Feb 10 '16 at 09:24

1 Answers1

1

It looks like the current Telephony APIs doen't let you read the precise call state.

In this commit, however https://github.com/android/platform_frameworks_base/commit/c5ac15a3e11c03951e269b243674858411204b67 You can see a proposal for a precise call state monitoring.

https://android-review.googlesource.com/#/c/60660/ Here you can see that at Feb 13 5:26 AM this "Change has been successfully merged into the git repository."

This means that sooner or later we'll see it in a future Android release.

araks
  • 40,738
  • 8
  • 34
  • 39