Have more options in the action_send dialog

0

I'm using action_send , but it does not give me options for WhatsApp, Facebook, and other social networks. Only Gmail and Message.

Code I'm using is:

    Intent share = new Intent(android.content.Intent.ACTION_SEND);
    share.setType("text/plain");
    share.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
    share.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
    share.putExtra(Intent.EXTRA_SUBJECT,  "Enter your title here");
    share.putExtra(Intent.EXTRA_TEXT, "Enter your description here");
    startActivity(Intent.createChooser(share, "Share"));

How can I make more application options appear for me to share? Something like this:

    
asked by anonymous 25.05.2017 / 22:43

1 answer

0

The most direct and common use of ACTION_SEND is to submit text content from one activity to another. For example, the app may share a URL of the page currently displayed as text with any other smartphone device you've already installed. This is useful for sharing an article or website with friends via email or social networks, however the options are provided by Android. Basically Gmail and Message appear because they are native to Android.

Something to do is filter the options that appear (en) , for example, remove all options and leave only WhatsApp, facebook and Gmail, but it is important to remember that they will only appear if already installed on the device.

    
26.05.2017 / 04:41