28

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.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Wasim
  • 386
  • 1
  • 4
  • 12

4 Answers4

4

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);
marmor
  • 27,641
  • 11
  • 107
  • 150
1

In addition to what marmor stated the updated documentation for android 10 Q states:-

This is no longer supported since Q, please use RoleManager.createRequestRoleIntent(String) with RoleManager.ROLE_DIALER instead.

The code actually worked when I followed freezo9 answer regarding intend filters in the manifest fie :- https://stackoverflow.com/a/55716209/7552894

adding these:-

<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.intent.action.DIAL"/>

<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>

<data android:scheme="tel"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.DIAL"/>

<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
Omar Boshra
  • 447
  • 7
  • 21
0

You can't make it the default programmatically. The entire point is the user gets to choose the default, so they can choose what app gets their texts and calls. You may be able to do it with root, but nothing else.

Gabe Sechan
  • 90,003
  • 9
  • 87
  • 127
  • Please check certain application like Truecaller they are able to do it. – Wasim Oct 08 '18 at 18:18
  • 1
    They can ask a user to make them the default. If there's a way they actually become it progamatically, its a bug that google will fix VERY quickly. Just like its impossible to become the default SMS app programatically, and has been for years. – Gabe Sechan Oct 08 '18 at 18:20
  • I want to know how make the application to behave like truecaller which gives user an option to make it a default phone application. Minimum requirements in terms of code. – Wasim Oct 08 '18 at 18:26
  • WHat they're probably doing is just displaying the settings screen for default phone application. That is possible (you can do the same thing for SMS), but the user will need to actually set it. – Gabe Sechan Oct 08 '18 at 18:28
  • "how to get that screen" - what snippet of code is responsible for showing that options. what are the other scenarios needed to handle by an Phone default app.?? – Wasim Oct 08 '18 at 18:33
  • 2
    @GabeSechan would you mind explaining on how to ask for that? And what exactly does it mean to be a default assistant handler? We have an app that provides additional user call statistics, it's not a phone app but it requires these permissions. Is the assistant handler the way to go? – NoHarmDan Oct 23 '18 at 08:36
  • That's incorrect. Apps can still get those permissions without rooting devices. The only thing is Google will not approve the app on their play store. – Srihari Karanth Oct 05 '19 at 05:11
  • @SrihariKaranth you misread. I said you can't make it the default without root. Not that you can't request the permission. – Gabe Sechan Oct 05 '19 at 18:04
0

By the way if your application is not a phone handler, but you still need them for functionality to work, you can try getting a waiver (see the last paragraph in the article): https://support.google.com/googleplay/android-developer/answer/9047303?hl=en so your app won't be a phone handler but still will be able to get those permissions.

Mara
  • 1
  • 1
  • 2
    The form has multiple attempts to trip you up and get you to admit you are trying to perform "unauthorized use" for the review that has little to do with the form, but is based on what their team of chimps thinks they can or can't find. – Abandoned Cart Dec 27 '18 at 02:11