How to share Image + Text + URL via WhatsApp in Android? -


i share text,image , url via whatsapp.

i have looked few links, has share text feature.

intent whatsappintent = new intent(intent.action_send); whatsappintent.settype("text/plain"); whatsappintent.setpackage("com.whatsapp"); whatsappintent.putextra(intent.extra_text, "text here"); try {     activity.startactivity(whatsappintent); } catch (android.content.activitynotfoundexception ex) {     toasthelper.makeshorttext("whatsapp have not been installed."); } 

uri imageuri = uri.parse(picturefile.getabsolutepath());     intent intent = new intent();    intent.setaction(intent.action_send);     intent.setpackage("com.whatsapp");      intent.putextra(intent.extra_text, picture_text);     intent.putextra(intent.extra_stream, imageuri);    intent.settype("image/jpeg");    intent.addflags(intent.flag_grant_read_uri_permission);      try {         startactivity(intent);     } catch (android.content.activitynotfoundexception ex) {         toasthelper.makeshorttext("whatsapp not installed.");     } 

Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -