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)


Comments

  1. Facebook share not working bro plz update

    ReplyDelete
  2. La solución esta en como escribes los comandos yo he intentado con los q el enlace me muestra, pero no todos funcionan bien, lo cual investigue y me di cuenta. que en otros videos tutoriales de los mismos temas ya expuestos; podíamos en la parte lógica, cambiar algunos de los comandos escritos que nos da este sitio o agregar algún otro. Mi consejo es que miren el mismo tema en otros tutoriales de lo mismo les aseguro van a encontrar fácil mente varios formas de hacer lo mismo

    ReplyDelete
  3. Can you tell me how to transfer data from a Activity to Fragment in Sketchware Pro?

    ReplyDelete
  4. Really, I heard about that. i am usting whatsp aap for a long time.l but i did not found this type app. juan you are saying right. i read your message and this blog. i have got many information from this blog. can i suggest you my advice about this. i have many ideas for you. thanks for information....

    ReplyDelete

Post a Comment

Popular posts from this blog

Simple car racing android game in Sketchware

Creating a Drawing View in Sketchware

Enable Fullscreen for Youtube videos in WebView

How to enable upload from webview in Sketchware?

List of Calendar Format symbols valid in Sketchware