0

How to send Text Message With Images without user intervention

short SMS_PORT = 15005; 
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(phoneNo, null, sms, null, null);
smsManager.sendDataMessage("5556",null,SMS_PORT,bFile,null,null);
//bFile is a Image byte Array which is stored in sdcard

Text Message Send successfully but Image doesn't send

patel
  • 830
  • 1
  • 11
  • 26

1 Answers1

-1

Use this code and let me know if it worked:

Intent sendIntent = new Intent(Intent.ACTION_SEND); 
sendIntent.putExtra("sms_body", "some text"); 
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(url));
sendIntent.setType("image/png"); 
Sam-In-TechValens
  • 2,501
  • 4
  • 34
  • 67
Ricky Khatri
  • 952
  • 2
  • 16
  • 42