Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(Intent.EXTRA_TEXT, text);
shareIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(Intent.createChooser(intent, "Invite with"));
The above code opens a dialog showing following apps:- Bluetooth, Email, Whatsapp, messages.
What i want to achieve is show all apps that uses phone number as primary source of contacting users. Eg. sms, whatsapp,viber..etc. Email Apps, Browsers... would not be on the list.
Thanks.