How to make an application default phone or Assistant handler on the device by giving user an option to make it default app

Wasim picture Wasim · Oct 8, 2018 · Viewed 13.5k times · Source

We have received a policy notice from playStore as:

Your app manifest requests the Call Log permission group (e.g. READ_CALL_LOG, WRITE_CALL_LOG, PROCESS_OUTGOING_CALLS)
It must be actively registered as the default Phone or Assistant handler on the device.

I am not able to understand what Assistant handler on the device. Any inputs or suggestions are most welcome.

what are the minimum requirements by the android application to fullfil the requirement.

Answer

marmor picture marmor · Jan 1, 2019

Check the documentation at: https://developer.android.com/reference/android/telecom/TelecomManager#ACTION_CHANGE_DEFAULT_DIALER

Sample code:

Intent intent = new Intent(TelecomManager.ACTION_CHANGE_DEFAULT_DIALER);
intent.putExtra(TelecomManager.EXTRA_CHANGE_DEFAULT_DIALER_PACKAGE_NAME, getActivity().getPackageName());
startActivity(intent);