HOW TO SHARE TEXT USING ANDROID SHARE INTENT ?

Mayank Tripathi

Total Post:807

Points:4035
Posted by  Mayank Tripathi
 576  View(s)
Ratings:
Rate this:
  1. Mayank Tripathi

    Post:807

    Points:4035
    How to share text using android share Intent ?

    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);

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!