For one of my customer, I have an Android COSU app in LockTask mode.
On an incoming/outgoing call, the InCallUI is well displayed because the phone app of the device is whitelisted.
However, in LockTask mode, the back button is still enabled in the navigation bar and their employees (as good ones :)) often hit it so they cannot hang up the conversation.
My question is:
Does it exist an Intent to bring back the InCallUI so users can interact with the keypad or hang up?
In this case, I could display an overlay (bar on top of the screen or button like Facebook Messenger) to bring back the InCallUI.
Thanks in advance :)
[EDIT] Exiting the LockTask mode is not an option ;)
Have you tried calling
TelecomManager.showInCallScreen()
? Its documentation says:Since READ_PHONE_STATE is a dangerous permission, it might be granted to your COSU app. Then, per the second clause of the above quote, you should be able to expose a button bringing back the InCallService to the foreground.
I haven't tested this myself, let me know if it works.