Android Enterprise - default phone app replacement

W
Wojciech
Isotrak Ltd

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?

a year ago
Android
ANSWERS

Hello Wojciech

Thank you for posting on SOTI Pulse.

Have you tried opening the app on an enrolled device and checking to see what the actual bundle ID is?  Not just the default one, as they may be different.  You can use the following script, to the device and review the outcome in the device logs.

identify_activity 

A Moderator will be reviewing your response in an attempt to assist you with finding a solution.

Warm regards,

SOTI Support Staff

W
Wojciech
a year ago

It seems that I did something wrong in my app. I've tried setting up some other app for a default caller (Truecaller) and it worked. I need to investigate what I did different

EG
Edgar Gomez
a year ago

I think you don't need to blacklist com.android.phone

W
Wojciech
a year ago

You are right, blocking com.android.phone or com.zebra.phone was not helpful.
I was able to setup different app for default caller but only when the above was NOT in the blacklist

T
TLMOD@SOTI
a year ago

Hi Wojciech,


Thanks for posting on SOTI pulse. Thanks Rafael and Edgar for responding to the post, your expertise and willingness to help are greatly appreciated!


Has your query been resolved? If not, or if you have any additional concerns, please don't hesitate to reach out. We are dedicated to providing assistance and support.


Kind Regards,