I could only find “how to make a call from your application” and the solution is:
EditText et = (EditText) findViewById(R.id.editText);
String s = et.getText().toString();
try {
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:" + s));
startActivity(callIntent);
} catch (ActivityNotFoundException activityException) {
Log.d("Calling a Phone Number", "Call failed" + activityException);
}
But this directly makes a call, without confirming. Like if the number must be preceded with a 0 user must be allowed to do it and then make a call and once the call is finished he must be taken back to the application activity where he started the intent.
Simply change
Intent.ACTION_CALLtoIntent.ACTION_VIEWin your code.Update:
To call just the phone use
Intent.ACTION_DIAL, howeverIntent.ACTION_VIEWcall messaging or phone.