I have problems with the Error 908 : The permission CALL_PHONE

Help me .

The PhoneCall component does not declare this permission in the Manifest. Therefore it can't be requested, neither at runtime (Android 6+) nor at install time (Android < 6).
(Btw, Google (Play Store) wouldn't allow it).

Use ActivityStarter to make a phone call.

Of course it does if you you build your own app and use it for your own use..

This will not work in companion if downloaded from Google Play you have to download companion within MIT builder page..


bild

Yes of course, because Companion declares this permission in the Manifest.

But only after declaring the missing permission in the Manifest of the APK.

Nopp

Ok, I didn't check that. Are you sure?
What else should this permission be needed for?

As I'm using it, so yes I'm sure.

Don't know more than to use the call function

OK, now I got it. :upside_down_face:

Only the directCall method requires this permission. The MakePhoneCall method works with an intent

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

Which version(s) of Android are we seeing issues on?

The CALL_PHONE permission is considered "dangerous" by Google and therefore if you want to publish an app with that permission in the store you have to give a written justification to Google for why it needs to be included. MIT's justification for the companion was rejected, so we don't include that permission in the Play Store version but it is available in the version we directly publish.

The MakePhoneCall block uses an intent to launch the default dialer app on the phone. The previous behavior of this block that called the API which requires the CALL_PHONE permission was moved to the MakePhoneCallDirect block.

On Android 12 and later, the manifest also needs to include a <queries> element with the intent filters the app intends to launch otherwise Android will reject the intent. We added the <queries> element in the SDK 31 update this summer, so any apps built since that release should include this additional metadata. The intent filter to match phone calls will be added regardless of whether MakePhoneCall or MakePhoneCallDirect is used.

1 Like

I had tested on a device running Android 9.
Thanks for the explanation!

Ah ok (I should have shown this):

    <queries>
        <intent>
            <action android:name="android.intent.action.DIAL"/>
        </intent>
    </queries>