Home > DeveloperSection > Interviews > How do we share text using android share Intent ?

Posted on    September-11-2015 4:33 AM

 Android Android  Android Intent 
Ratings:
 1 Answer(s)
  607  View(s)
Rate this:

Mayank Tripathi
Mayank Tripathi

Total Post:807

Points:4035
Posted on    September-11-2015 4:33 AM

Share intent is an easy and convenient way of sharing content of your application with other apps.

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
sendIntent.setType("text/plain");
startActivity(sendIntent);

Don't want to miss updates? Please click the below button!

Follow MindStick