Articles‎ > ‎Android Articles‎ > ‎

Sharing URL to facebook, Twitter ,Google+ ,Bluetooth and email in Android?

You can share URL facebook, Twitter ,Google+ ,Bluetooth, mail and Others

Share Button Click Action Code:

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, "little drops @ thiyagaraaj.com");
intent.putExtra(Intent.EXTRA_TEXT, "http://www.thiyagaraaj.com");
startActivity(Intent.createChooser( intent , "Share URL"));

Manifest.xml:

<activity android:name="ShareLink">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<meta-data/>
</activity>