Reputation: 34287
I have tried this code here but it merely calls the in built app instead of making a call directly:
Intent i = new Intent(android.content.Intent.ACTION_DIAL,
Uri.parse("tel:+" + phoneNumber));
startActivity(i);
Any clue?
Upvotes: 3
Views: 2693
Reputation: 48612
You can do this simply. It make the call directly.
Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + "Your Phone_number"));
startActivity(callIntent);
and add this permission in AndroidManifest.xml
<uses-permission android:name="android.permission.CALL_PHONE" />
Upvotes: 4