如何在我项目的某个文件夹中发送图像(MMS)?

时间:2015-02-21 22:44:57

标签: java android mms

说我在app/images/image.png有一张图片。

如何将该图像发送到另一部手机?

换句话说,我该如何发送彩信?

我已经写了一些短信发送代码,但是当我更换" Sms"时它不起作用。与" Mms":

        try {
            SmsManager smsManager = SmsManager.getDefault();
            ArrayList<String> parts = smsManager.divideMessage(msg);
            smsManager.sendMultipartTextMessage(phoneNo, null, parts, null, null);
            Toast.makeText(
                    getApplicationContext(),
                    "SMS sent",
                    Toast.LENGTH_LONG
            ).show();
            Log.v("sendSMSMessage",msg);
        } catch (Exception e) {
            Toast.makeText(
                    getApplicationContext(),
                    "Failed to send. Try again.",
                    Toast.LENGTH_LONG
            ).show();
            e.printStackTrace();
        }

0 个答案:

没有答案