Have more options in action_send dialog

Asked

Viewed 49 times

0

I’m using the action_send, but it does not give me the options of 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 get more app options to share? Something like this:

inserir a descrição da imagem aqui

  • 1

    Even having facebook and apps from other social networks installed on the device, they do not appear?

1 answer

0

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

Something possible to do is filter the options that appear, for example, remove all options and leave only Whatsapp, facebook and Gmail, but it is important to remember that only appear if already installed on the device.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.