1

I am trying to use share intent, but i think, it does not work correctly. In list of applications for sharing, Facebook or Pinterest do not appear but Gmail or Cloud Print do. I want all possible applications to appear there.

Here is my code. Thanks for any advices.

final Intent shareIntent = new Intent(Intent.ACTION_SEND);   
    shareIntent.setType("text/plain");   
    shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "App name");
    shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, "");
    startActivity(Intent.createChooser(shareIntent, "Share via..."));
OlivierLi
  • 2,798
  • 1
  • 23
  • 30
Twilie2012
  • 79
  • 3
  • 8
  • 1
    By definition, all possible applications *are* appearing there. Not every application is set up to share plain text. – CommonsWare Feb 20 '14 at 20:21
  • More info about using intents for Facebook sharing: http://stackoverflow.com/questions/7545254/android-and-facebook-share-intent (If you want to share a link, for example, you can still do that with plain intents, without the Facebook SDK.) – Jonik Jan 28 '15 at 13:45
  • Pinterest app indeed doesn't support `ACTION_SEND`, but as it turns out, **it *is* possible to share to Pinterest using plain Android intents** just fine. I documented it here: http://stackoverflow.com/a/28197134/56285 – Jonik Jan 28 '15 at 16:22

1 Answers1

3

I don't know about Pinterest, but for Facebook it seems like a known issue, that it doesn't accept those intents.

Facebook provides it's SDK though: https://github.com/facebook/facebook-android-sdk

My guess is Pinterest does the same, since they also provide their SDK: https://developers.pinterest.com/android/

gruszczy
  • 40,948
  • 31
  • 128
  • 181