Reputation: 61
I would like to make phone calls from my app. I m using that code:
private void call7() {
try {
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:281212114"));
startActivity(callIntent);
} catch (ActivityNotFoundException e) {
Log.e("CALL", "Call failed", e);
}
}
my question is, how could i just have the phone number in my call view but make the call only when the user press the call button?
Upvotes: 2
Views: 456
Reputation: 5310
Just use ACTION_DIAL
instead of ACTION_CALL
when you build your intent call.
Upvotes: 5
Reputation: 3595
Use ACTION_VIEW instead of ACTION_CALL. See here: http://developer.android.com/reference/android/content/Intent.html
Upvotes: 1