Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android launch SMS intent without any recipient

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

like image 623
user2059935 Avatar asked Feb 13 '13 18:02

user2059935


1 Answers

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

like image 181
William Kinaan Avatar answered Nov 09 '22 02:11

William Kinaan