0

This how I let the user send an sms:

Intent intentt = new Intent(Intent.ACTION_SEND);
intentt.setType("text/plain");
intentt.putExtra(Intent.EXTRA_TEXT, "");
intentt.putExtra("address", selecteditem_phone);
startActivityForResult(Intent.createChooser(intentt, ""), 0);

This brings up a list of a lot of apps. How can I tell android to bring up only the sms capable apps?

erdomester
  • 11,789
  • 32
  • 132
  • 234

1 Answers1

2

Create your intent like this instead:

Intent intentt = new Intent(Intent.ACTION_VIEW);         
intentt.setData(Uri.parse("sms:"));
intentt.setType("vnd.android-dir/mms-sms");
intentt.putExtra(Intent.EXTRA_TEXT, "");
intentt.putExtra("address", selecteditem_phone);
startActivityForResult(Intent.createChooser(intentt, ""), 0);
Kurtis Nusbaum
  • 30,445
  • 13
  • 78
  • 102