As default sms app is added in 4.4, I cannot open default sms app like this:
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setType("vnd.android-dir/mms-sms");
startActivity(intent);
So how could I get default sms app's package name, so I can open it from my app directly?
The accepted answer did not work for me (and seems rather unreliable).
A better way to get the package name is
Telephony.Sms.getDefaultSmsPackage(context);
This requires API 19+
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With