karan vs
karan vs

Reputation: 3364

Direct calling via CALL_PHONE

Google has declared "Direct Calling" as disallowed usecase in its permission policies and offers alternative to open dialer instead.

There are various apps (Zomato, Ola, Uber etc) that uses "Direct Calling feature".

How are they allowed to do so ?

One way would be to get exception from google but Google Play console does not allow to file a declaration form for CALL_PHONE permission rather it provide for SMS/CALL_LOG permission group ?

How can I use "Direct Calling" feature in my app without violating permission policy ?

Upvotes: 0

Views: 79

Answers (3)

Anupam
Anupam

Reputation: 2853

Try this in your activity part-

Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(...)); 
startActivity(intent);

In Manifest -

<uses-permission android:name="android.permission.CALL_PHONE" />

Upvotes: 0

Aravind V
Aravind V

Reputation: 358

If you really need these permissions to fulfill certain functionalities, you should be filling 6-page Permission Declaration Form and submitting to Google Play for review. just follow this link: https://proandroiddev.com/no-more-sms-call-log-permissions-now-what-9b8226de7827

Upvotes: 0

Akshay Katariya
Akshay Katariya

Reputation: 1474

Want to initiate a phone call? Don’t use CALL_PHONE permission, use Dialer intent instead.

val intent = Intent().apply {
    action = Intent.ACTION_DIAL
    data = Uri.parse("tel:0123456789")
}
startActivity(intent)

Upvotes: 1

Related Questions