I made a simple app that contains emergency numbers in a list view, and what I want to do is that when I click on the contact on the list view I'm able to call a phone number
Asked
Active
Viewed 74 times
-1
-
2Possible duplicate of [how to make phone call using intent in android?](http://stackoverflow.com/questions/4275678/how-to-make-phone-call-using-intent-in-android) – mbelsky Oct 22 '15 at 03:41
3 Answers
1
This is an example about how you can call to number 123456789.
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:123456789"));
startActivity(intent);
Just put it in OnItemClickListener() method of your listView. Hope that will help you out.

Ngoc Don
- 11
- 2
1
write under button onclick
String number = "123456789";//mobile number
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:" +number));
startActivity(intent)

Android
- 535
- 5
- 16
1
String mono = "9876543210";//mobile number
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:" +mono));
startActivity(intent);
in Manifest set permission CALL_PHONE

Nirav Shah
- 67
- 10