import android.content.Context;
import android.content.Intent;
import android.net.Uri;

public class SmsUtil {
    /**
     * 调用系统界面,给指定的号码发送短信,并附带短信内容
     *
     * @param context
     * @param number
     * @param body
     */
    public static void sendSmsWithBody(Context context, String number, String body) {
        Intent sendIntent = new Intent(Intent.ACTION_SENDTO);
        sendIntent.setData(Uri.parse("smsto:" + number));
        sendIntent.putExtra("sms_body", body);
        context.startActivity(sendIntent);
    }
}

 

相关文章:

  • 2022-12-23
  • 2021-06-21
  • 2021-12-27
  • 2022-12-23
  • 2022-02-28
  • 2021-12-31
  • 2021-07-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2022-03-02
  • 2021-10-03
  • 2021-08-29
相关资源
相似解决方案