Our app needs to become the default dialer app (also known as: "default phone handler", "default calling app") so it'll be able to make calls under Android's new permissions policy.
We use the following intent to show a system dialog to ask the user to make our app the default:
Intent intent = new Intent(TelecomManager.ACTION_CHANGE_DEFAULT_DIALER);
intent.putExtra(TelecomManager.EXTRA_CHANGE_DEFAULT_DIALER_PACKAGE_NAME, getPackageName());
startActivityForResult(intent, RC_DEFAULT_PHONE);
This works well on all our test devices, and apparently for most users, but doesn't show any dialog and immediately returns a RESULT_CANCELED
result code for some devices.
By looking at the reports, it seems like the majority if not all reports are coming from Huawei
devices (and from Huawei
's brand - Honor
).
Any idea how to display the default call app dialog on those devices?
Any other intent we can run to help the user manually set our app to be the default calling app?