Use of Intent to share text and links

The text from Edittext fields and from Textview fields can be shared from the App using Intent. Here are the Logic blocks to be used for the purpose.

1. To share text to WhatsApp
  • Intent (name) setAction ACTION_VIEW
  • Intent (name) setData join whatsapp://send?text=and (Edittext/Textview)getText
  • StartActivity (name)

2. To share text to Twitter
  • Intent (name) setAction ACTION_VIEW
  • Intent (name) setData join http://twitter.com/share?text=and (Edittext/Textview)getText
  • StartActivity (name)

3. To share text on Facebook
  • Intent (name) setAction ACTION_VIEW
  • Intent (name) setData join https://www.facebook.com/sharer.php?u=[URL]&t=and (Edittext/Textview)getText
  • StartActivity (name)

4. To share on Google plus
  • Intent (name) setAction ACTION_VIEW
  • Intent (name) setData join https://plus.google.com/share?url=[URL]&text=and (Edittext/Textview)getText
  • StartActivity (name)

5. To share a link on LinkedIn
  • Intent (name) setAction ACTION_VIEW
  • Intent (name) setData https://www.linkedin.com/shareArticle?mini=true&url=[URL]&title=[Title]&summary=[text]&source=[text]
  • StartActivity (name)