I am creating a notepad application in android. I have given a functionality to share individual note with other apps. I want the share function to share the title and content of the note. I can't seem to make it work. Below is my java code for share intent.
JAVA
String title=noteModel.getTitle();
String content=noteModel.getContent();
Intent intentShare = new Intent();
intentShare.setAction(Intent.ACTION_SEND);
intentShare.putExtra(Intent.EXTRA_TEXT,title);
intentShare.putExtra(Intent.EXTRA_TEXT,content);
intentShare.setType("text/plain");
context.startActivity(intentShare.createChooser(intentShare,"Send note to"));