How can I make call by pressing button? I get my number as a string from EditText. Here is my sample code:
call
EditText
String phone = editPhone
Try this
EditText num = (EditText)findViewById(R.id.phone_number); String uri = "tel:" + num.trim(); Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(uri)); startActivity(intent);