Reputation: 544
i am trying to implement MMS application to send a pic/image.For that i have written below code.But after press ok message is sending like SMS not like MMS(Image is not attaching). Please help me wheter the following code is correct or not.
try { Uri uri = Uri.parse("file://mnt/sdcard/pictures/kc.jpg");
Intent i = new Intent(Intent.ACTION_SEND);
i.putExtra("address",etnum.getText().toString());
i.putExtra("sms_body",etmsg.getText().toString());
i.putExtra(Intent.EXTRA_STREAM,"file:/"+uri);
i.setType("image/png");
startActivity(i);
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}
Upvotes: 0
Views: 115
Reputation: 7230
Upvotes: 1