Going back to activity InCallActivity in com.android.incallui

8.1k Views Asked by At

I try to add a button on my interface to go back to the phone InCallActivity during a phone call. On samsung phones, the activity is in the package 'com.android.incallui' or 'com.samsung.android.incallui'.

So I tried the following :

Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.android.incallui");
startActivity( launchIntent );

But getLaunchIntentForPackage returns null, even if the package is available on the phone.

I also tried to use ACTION_CALL_BUTTON

Intent intent = new Intent(Intent.ACTION_CALL_BUTTON);
intent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
startActivity(intent);

But it starts the dialer instead of bringing back the current incall activity.

Do you see any possibility to go back to the current incall view using startActivity or similar ?

Thank you

1

There are 1 best solutions below

0
On

This question has relevance for managed devices (mdm). Even with incallui and samsung dialer and contact apps installed it will not dial in kiosk mode.

You can start contacts and select someone and press the tel button - nothing happens. But if the same person is now calling you: incallui will open and you can hook up or take the call. From inside the incallui you can then also call outgoing.

But sadly the app is always closed on minimizing so you cannot go back to it via task switching.

So I am left with a managed phone that cannot make calls other than just after someone has called you - annoying!