how can i send the Text and the picture(url) through mms in android -
Here is the code that I have tried. I just wanted to send a text and video picture through MMS.But Only send text, but do not help getting any picture attached.can.I am new to this. {ImageModel = videoDetails.getVideoImagesList () Find (0)
ivbMessage.setOnClickListener (New OnClickListener () {@Override Public Zero onClick (see v) {// TODO auto-created method stub} ; ImageUrl = imageModel.getUrl (); println ("*****" + imageUrl); Uri screenshotUri = Uri.parse (imageUrl); intent to sendIntent = new intent (Intent.ACTION_VIEW); sendIntent.putExtra ("sms_body "ImageUrl"; sendIntent.putExtra (Intent.EXTRA_STREAM, screenshotUri); sendIntent.setType ("image / PNG"); activity.setterity (sender);} hold (exception e) {toast. Text (ac tivity, " SMS failed, please try again later! ", Toast. LN New.h_LOG) Show (); e.printStackTrace ();}}}
Should:
intent SendIntent = new intent (intent.ACTION_SEND); // should not send action VIEW sendIntent.putExtra ("sms_body", "some text"); SendIntent.putExtra (Intent. EXTRA_STREAM, URI.parse (url)); sendIntent.setType ("image / png"); // it seems that you have wrong action in your code
it should be ACTION_SEND
needs to be typed with small letters and your type is also incorrect is. It should be "image / png"
.
And your URL should be correct on the image.
Comments
Post a Comment