share intent android

Solutions on MaxInterview for share intent android by the best coders in the world

showing results for - "share intent android"
Federica
06 Feb 2020
1 Intent shareIntent = new Intent(Intent.ACTION_SEND);
2            shareIntent.setType("text/plain");
3            shareIntent.putExtra(Intent.EXTRA_SUBJECT, "My application name");
4            String shareMessage = "\n" + tvBlogTitle.getText().toString()+ "\n\n";
5            shareMessage = shareMessage + bundle.getString("link") + "\n\n";
6            shareIntent.putExtra(Intent.EXTRA_TEXT, shareMessage);
7
8            startActivity(Intent.createChooser(shareIntent, "choose one"));