I am using following code to make a call from my android application:
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:9898989898"));
startActivity(intent);
This opens Intent Chooser if Skype is installed in phone. What i want is it should directly make call from default call application.
How can I achieve this?
Use intent.setPackage("com.android.phone");
Like
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setPackage("com.android.phone");
intent.setData(Uri.parse("tel:9898989898"));
startActivity(intent);
But better is to let the user to choose.
Read more at How to call from Android Native Dialers, ignore other dialers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With