0

I develop a default phone app using the InCallService API. I want to show my UI for incoming calls, but in case of outgoing calls i want to show the default system phone UI (e.g when the user initiates a call from his contacts).

According the android docs for InCallService : "Note: If the app filling the RoleManager.ROLE_DIALER returns a null InCallService during binding, the Telecom framework will automatically fall back to using the dialer app preloaded on the device"

The problem is that when i try to return a null on binding, it actually shows nothing.

I tried to override the onBind method like this :

public class myInCallService extends InCallService {

    @Override
    public IBinder onBind (Intent intent) {
        if (/** incoming call **/) {
            return super.onBind(intent);
        } else {
            return null;
        }
    }
}

I'm targeting Android 8 (API 26).

Thank you in advance for your answer.

Ilan
  • 41
  • 7

0 Answers0