I am using Intent to make calls from my app.
Here is the onClick for the TextView on which if the user clicks I want to open the dialer:
txtCall1.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) { Intent callIntent = new Intent(Intent.ACTION_DIAL); callIntent.addCategory(Intent.CATEGORY_DEFAULT); callIntent.setData(Uri.parse("tel:"+ci.getContactPhone1())); startActivity(callIntent); } });
My problem is that with Api level 12 devices instead of dialer a dialog opens which asks to add the number to contact. This is not the case for Api level 19 or 18.
This is tools I am using. I have just updated my everything.