返回顶部

收藏

Android发送彩信的代码

更多
          StringBuilder sb = new StringBuilder();
            sb.append(”file://”);
          sb.append(fd.getAbsoluteFile());
           Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(”mmsto”, number, null));
            // Below extra datas are all optional.
            intent.putExtra(Messaging.KEY_ACTION_SENDTO_MESSAGE_SUBJECT, subject);
            intent.putExtra(Messaging.KEY_ACTION_SENDTO_MESSAGE_BODY, body);
            intent.putExtra(Messaging.KEY_ACTION_SENDTO_CONTENT_URI, sb.toString());
            intent.putExtra(Messaging.KEY_ACTION_SENDTO_COMPOSE_MODE, composeMode);
            intent.putExtra(Messaging.KEY_ACTION_SENDTO_EXIT_ON_SENT, exitOnSent);
           startActivity(intent);

标签:彩信,Android,java

收藏

0人收藏

支持

0

反对

0

发表评论