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 :
CALL_STATE_IDLE
: When no call activity is thereCALL_STATE_RINGING
: When a new call is ringing and waiting to be taken up.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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With