How to share text from the "EditText" or "Textbox" via a share button
<p>I have a textbox(EditText) in my app &amp; a button, what i want to do is that when anyone tap the button, the text written in the textbox(EditText) get copied &amp; this text can be shared to any of the app such as - Messaging, Gmail, Ymail, etc. 
Now What i am doing is getting the text from the "EditText" &amp; storing it into a new variable (string) say 'a' &amp; now applying the Intent "ACTION_SEND_MULTIPLE"</p>

<p>Here is the CODE for Intent</p>

<pre><code>Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND_MULTIPLE);
emailIntent.setType("text/plain");
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] {"example@gmail.com"});
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "a");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, a);
startActivity(Intent.createChooser(emailIntent, "Share it via..."));
</code></pre>
