android launch SMS intent without any recipient

前端 未结 1 1757
再見小時候
再見小時候 2021-01-17 17:54

I want to open the Android SMS application from my application and I don\'t want to set any contact as a recipient, How?

相关标签:
1条回答
  • 2021-01-17 18:17
    Uri uri = Uri.parse("smsto:");
    Intent intent = new Intent(Intent.ACTION_SENDTO, uri);
    intent.putExtra("sms_body", "Hello World!");  
    startActivity(intent);
    

    note

    this way doesn't need any permission in Manifest

    0 讨论(0)
提交回复
热议问题