Have written below code to share text in android. Issue i am facing is to prefill the phone number in the sms app.
public static void shareText(final String extraText, final String extraEmail, final String phoneNumber) {
Intent textShareIntent = new Intent(android.content.Intent.ACTION_SEND);
textShareIntent.setType("text/plain");
if (null != extraText) {
textShareIntent.putExtra(android.content.Intent.EXTRA_TEXT, extraText);
}
if (null != extraEmail) {
textShareIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{extraEmail});
}
if (null != phoneNumber) {
textShareIntent.putExtra(Intent.EXTRA_PHONE_NUMBER, new String[]{phoneNumber});
}
startActivity(Intent.createChooser(textShareIntent, "Share via"));
}