How to make a phone call in android when user Click on textView then automatically dail a number in textView ?
TextView tv=(TextView) findViewById(R.id.tv_contact);
String url = tv.getText().toString();
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(url));
tv.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
startActivity(intent);
}
});'
Add permission to call in AndroidManifest.xml file.
First make your TextView clickable by adding below in your layout.xml
Then in your Activity Class, inside OnClickListener of that particular TextView add below code