public static void gotoApp(Context context, String namespace, String url) { if (ApkUtils.applicationInstalled(context, namespace)) { openApp(context, namespace); // ApkUtils.startApplication(namespace, activity); } else { openDownloadApp(context, url); } }
public static int getAppLevel(String path, String ns) { File fApk = new File(path); String apkName = fApk.getName(); int applevel = 3; if (ApkUtils.isAndroidApp(apkName)) { applevel = 0; } if (applevel == 3) { if (ApkUtils.isGoogleApp(ns)) { applevel = 1; } } if (applevel == 3) { if (ApkUtils.isHtcApp(ns)) { applevel = 2; } } return applevel; }