I need the share button to share the text in the textView in this way,I am a beginner in java and android
Asked
Active
Viewed 9,291 times
4 Answers
14
on Button Click
Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(Intent.EXTRA_TEXT,"Your score and Some extra text");
shareIntent.putExtra(Intent.EXTRA_SUBJECT, "The title");
startActivity(Intent.createChooser(shareIntent, "Share..."));

Ahmad
- 69,608
- 17
- 111
- 137

Mohsin Naeem
- 12,542
- 3
- 39
- 53
1
Take a look at how to use the Intent that launches the Share Via dialog.
See this post that has your answer : Android Share Via Dialog
1
Here is a complete tutorial for this. http://mobile.tutsplus.com/tutorials/android/android-sdk-implement-a-share-intent/

Abhishek Sabbarwal
- 3,758
- 1
- 26
- 41