/** * 分享应用,手机中所有带有分享功能的App都会被调起 */ private void sharedApp(String packageName) { Intent intent = new Intent(); intent.setAction(Intent.ACTION_SEND); intent.addCategory(Intent.CATEGORY_DEFAULT); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT, new StringBuilder("推荐给您一款应用:") .append(packageName).toString()); startActivity(intent); }