I am working on an App that should detect when Phone Call is placed on hold, all I can find in Android Telephony documentation is 3 states, that is CALL_STATE_RINGING when Phone is ringing, CALL_STATE_OFFHOOK When call is in progress or on Hold or CALL_STATE_IDLE when no call activity exists, but I would like to know, has anyone found out a way around to detect exactly when call is on Hold? I need to do some action only when call is on hold.
Asked
Active
Viewed 1,743 times
2 Answers
1
Take a look at this answer https://stackoverflow.com/a/29490832/3836513 . Using PreciseCallState you can read when call is put on hold.
-
So am guessing its only possible on Android 5.0 and above? – Chrome Landos Sep 27 '15 at 11:49
1
This is possible in Android 5.0 using the The PreciseCallState, You can read call state such as idle,busy and ringing.GithubCode PreciseCallStateDetail

Maheshwar Ligade
- 6,709
- 4
- 42
- 59
-
import android.telephony.DisconnectCause; import android.telephony.PreciseCallState; import android.telephony.PreciseDataConnectionState; import android.telephony.PreciseDisconnectCause; these Imports are not working they cannot be resolved, do I need to download the entire android framework? – Chrome Landos Sep 27 '15 at 11:44
-
1@Chrome Please below link it will give you brief idea http://www.compiletimeerror.com/2013/08/android-call-state-listener-example.html#.VgjGxrOY7Hw – Maheshwar Ligade Sep 28 '15 at 04:49