Issue
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?
Solution
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
Answered By - Pankaj Kumar
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.