Ejemplo n.º 1
0
  private void pageJump() {
    boolean isFrist1 = true;
    Intent intent = new Intent(this, MainActivity_new.class);
    if (isFrist) {
      //            sp.getBooleanData(SplashActivity.this,"isFrist",false);
      L.e("***第一次运行" + isFrist + "显示声明");
      sp.add("isFrist", false);
      isFrist1 = true;
      if (!info.versionName.equals(current)) {
        BaseApplication.isUpdate = true;
        intent.putExtra("spec", spec);
        intent.putExtra("force", force);
        intent.putExtra("newFeatures", newFeatures);
      }

    } else {
      L.e("***不是第一次运行" + isFrist + "不显示");
      isFrist1 = false;
      if (!info.versionName.equals(current)) {
        BaseApplication.isUpdate = true;
        intent.putExtra("spec", spec);
        intent.putExtra("force", force);
        intent.putExtra("newFeatures", newFeatures);
      }
    }
    intent.putExtra("isFrist1", isFrist1);
    startActivity(intent);
    finish();
  }
Ejemplo n.º 2
0
  @Override
  public void init() {
    AnalyticsConfig.enableEncrypt(true);
    Intent intent = new Intent(SplashActivity.this, DownLoadingService.class);
    SplashActivity.this.startService(intent);

    requestUrl = Constants.URL_UPDATE;
    packageManager = this.getPackageManager();
    try {
      info = packageManager.getPackageInfo(this.getPackageName(), 0);

    } catch (PackageManager.NameNotFoundException e) {
      e.printStackTrace();
    }
    L.e("PackageName:" + getPackageName());
    //        System.out.println("***SplashActivity info.versionCode:" +info.versionCode
    // +"**info.versionName:" + info.versionName +
    //                "*** info.packageName:" +  info.packageName + " info.signatures:" +
    // info.signatures);
    getNetDate();
    getNetDate2();
    System.out.println("***sp=" + sp);
  }