Comparte imagen y texto a través de whatsapp.
Uso el siguiente código para compartir una imagen y un texto a través de WhatsApp. Sin embargo, solo comparte la imagen, no el texto. He buscado en todo el Internet, pero no he encontrado una solución.
String message = Fname + Mobileno + Homeno + Workmail + Homemail
+ Gtalk + Skype + Address + Company + Title + Website;
Intent shareIntent = new Intent(Intent.ACTION_SEND);
Uri uri = Uri.parse("file://"
+ Environment.getExternalStorageDirectory()
+ "/Talk&Share/Images/profpic.png");
shareIntent.putExtra(Intent.EXTRA_TEXT, message);
shareIntent.putExtra(Intent.EXTRA_SUBJECT, "Contact");
if(uri != null){
shareIntent.putExtra(Intent.EXTRA_STREAM, uri);
shareIntent.setType("image/plain");
}else{
shareIntent.setType("plain/text");
}
return shareIntent;