how could I get default sms app's package name?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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? 回答1: // http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4.4_r1/android/provider/Settings.java#Settings.Secure.0SMS_DEFAULT_APPLICATION public static final String SMS_DEFAULT