Launch Sms Application with an Intent

How to open sms app via implicit intent?

You can try this, it work for me:

Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_APP_MESSAGING);
startActivity(intent);

Launch default SMS app without a message

    Intent intent = new Intent(Intent.ACTION_MAIN);

intent.addCategory(Intent.CATEGORY_DEFAULT);

intent.setType("vnd.android-dir/mms-sms");

startActivity(intent);

This may be what you want.

android launch SMS intent without any recipient

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



Related Topics



Leave a reply



Submit