How can I get event that outgoing call is accepted from the opposite in Android 13?

96 Views Asked by At

I'm developing a call recorder app that uses of default call app on Android 13.

I need to get the event when my outgoing call is accepted from the opposite at that time.

I tried using TelephonyCallback(), TelephonyCallback.CallStateListener. It brings the connection event well when I accept incoming call like:

    CALL_STATE_IDLE
    CALL_STATE_RINGING  <-- call incoming
    CALL_STATE_OFFHOOK  <-- when I accept
    CALL_STATE_IDLE     <-- call end

but on outgoing call, it doesn't give me the event that the opposite accepts like:

    CALL_STATE_IDLE
    CALL_STATE_OFFHOOK  <-- call outgoing
    CALL_STATE_IDLE     <-- call end

There is many duplicated questions but they use old Android OS version and deprecated/blocked permission.

Some broadcasts or accessing is only granted to system apps.

  • Ex) android.permission.READ_PRECISE_PHONE_STATE

I looked up android telecom libraries as well but other classes also use the same CALL_STATE value.

Is there any way to get the event?

0

There are 0 best solutions below