Пример #1
0
 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);
   }
 }
Пример #2
0
  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;
  }