Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=包名"));
需要判断本机是否安装有应用市场,
// 判断是否存在应用市场
public static boolean judge(Context paramContext, Intent paramIntent) {
List<ResolveInfo> localList = paramContext.getPackageManager().queryIntentActivities(paramIntent, PackageManager.GET_INTENT_FILTERS);
if ((localList != null) && (localList.size() > 0)) {
return false;
} else {
return true;
}
}
否则,导致应用闪退