如何使用图像发送短信无需用户干预
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
短信发送成功但图片无法发送
答案 0 :(得分:-1)
使用此代码并告诉我它是否有效:
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");