android - Unable to send gif image to the Messanger -


i want send gif image stored in drawable messenger. tried below code displaying file not attached method .please, anyone, me resolve issue.

          int[] imageid = {          r.drawable.congrats,          r.drawable.dog,         r.drawable.giphy,         r.drawable.good_night,         r.drawable.pokeman,         r.drawable.redrose,         r.drawable.wibd };    uri path = uri.parse("android.resource://" +     imagekeyboard.this.getpackagename() + "/" + imageid[position]);    string defaultsmspackagename = telephony.sms.getdefaultsmspackage(imagekeyboard.this); //need change build api 19                    intent intent = new intent(intent.action_send,uri.parse("mms://"));                  intent.setpackage(defaultsmspackagename);                    intent.putextra("sms_body", "hi how you");                    intent.putextra(intent.extra_stream, path);                    intent.settype("image/gif");                 intent.addflags(intent.flag_activity_new_task);                startactivity(intent); 


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -