Reputation: 779
I am working on the new phone app for Android. Obviously it needs to make and receive phone calls.
My first problem is how to place a phone call from the app without invoking System default dialer. Making calls using Intent is very easy. However when I try to place a call without using Intent then that's entirely different ball of wax.
It seems that I need to use android.telephony but I can't find any good resources that could tell me where to start. Simple tutorial would be nice.
If you could point me to a resource that would help me that will be really appreciated.
Upvotes: 4
Views: 7978
Reputation: 11
i faced same problem couldn't ask default dialer in phone os >= Q android check my asnwer https://stackoverflow.com/a/71094871/15072590
Upvotes: 0
Reputation: 150
From Android 10 onwards the only way to handle phone calls is by using the InCallService
APIs. I have made a basic dialer app that explains basics of how to handle calls as a default dialer app. https://github.com/adnan-creator/java-custom-dialer
Upvotes: 1
Reputation: 7791
Create an app that responds to Intent.ACTION_DIAL
. In the AndroidManifest.xml
you need to add the following to that Activity:
<intent-filter>
<action android:name="android.intent.action.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
You can read more in:
Upvotes: 0