hacknik

Android text sharing with share option

Dec 18th, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1. Android text sharing with share option
  2.  
  3.         Intent sharingIntent = new Intent(Intent.ACTION_SEND);
  4.         sharingIntent.setType("text/html");
  5.         sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml("<p>This is the text that will be shared.</p>"));
  6.         startActivity(Intent.createChooser(sharingIntent, "Share using"));
Advertisement
Add Comment
Please, Sign In to add comment