I'm working on creating a custom phone/dialer app.
However, I'm having troubles with granting phone role to my app a.k.a. changing the default app for phone calls.
Some tech details:
- We are using MobiControl Version: 15.6.5.1018
- Support devices with android 10+.
- My devices are Zebra and most of them are model TC57x.
- Devices are in lockdown, showing kiosk dashboard.
My app is requesting a phone app role as specified in here
https://developer.android.com/reference/android/app/role/RoleManager
I have blacklisted default phone apps via a Profile, like that:
Profile -> Configuration -> App run control
Blacklist
Phone - com.android.phone
Zebra Phone - com.zebra.phone
Then I've used a legacy script to grant all of the permissions to my custom phone app
afw_set_permission_grant_state com.example.dev android.permission.CALL_PHONE allow
afw_set_permission_grant_state com.example.dev android.permission.READ_PHONE_STATE allow
afw_set_permission_grant_state com.example.dev android.permission.ANSWER_PHONE_CALLS allow
afw_set_permission_grant_state com.example.dev android.permission.READ_CALL_LOG allow
afw_set_permission_grant_state com.example.dev android.permission.READ_CONTACTS allow
restartagent
However, when I do a phone call from my second device my custom phone app is not launched. It's even more interesting, as the locked device does not launch any app for the incoming call.
How can I set my custom app to be default phone app?