Exemplo n.º 1
0
  @Override
  public void onResume() {
    super.onResume();

    settings.load();

    if (StringUtils.isNotBlank(title)) {
      app.setAction(title);
    } else if (StringUtils.isNotBlank(name)) {
      app.setAction(name);
    }

    // sensor & geolocation manager
    if (geo == null) {
      geo = app.startGeo(this, geoUpdate, base, settings, 0, 0);
    }
    if (settings.useCompass == 1 && dir == null) {
      dir = app.startDir(this, dirUpdate);
    }

    // keep backlight on
    if (pm == null) {
      pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
    }

    // updater thread
    if (updater == null) {
      updater = new updaterThread(updaterHandler);
      updater.start();
    }
  }
  @Override
  public void onResume() {
    super.onResume();

    setGo4CacheAction();

    // sensor & geolocation manager
    if (geo == null) {
      geo = app.startGeo(geoUpdate);
    }
    if (Settings.isUseCompass() && dir == null) {
      dir = app.startDir(this, dirUpdate);
    }

    // keep backlight on
    if (pm == null) {
      pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
    }

    // updater thread
    if (updater == null) {
      updater = new updaterThread(updaterHandler);
      updater.start();
    }
  }
Exemplo n.º 3
0
  @Override
  public void onResume() {
    super.onResume();

    app.addGeoObserver(this);

    if (waitDialog == null) {
      waitDialog = ProgressDialog.show(this, null, res.getString(R.string.waypoint_loading), true);
      waitDialog.setCancelable(true);

      (new loadWaypoint()).start();
    }
  }
 @Override
 public void onResume() {
   super.onResume();
   final Uri uri = getIntent().getData();
   if (uri != null) {
     final String verifier = uri.getQueryParameter("oauth_verifier");
     if (StringUtils.isNotBlank(verifier)) {
       exchangeTokens(verifier);
     } else {
       // We can shortcut the whole verification process if we do not have a token at all.
       changeTokensHandler.sendEmptyMessage(NOT_AUTHENTICATED);
     }
   }
 }
  @Override
  public void onResume() {
    super.onResume();

    if (geo == null) {
      geo = app.startGeo(geoUpdate);
    }

    if (id > 0) {
      if (waitDialog == null) {
        waitDialog =
            ProgressDialog.show(this, null, res.getString(R.string.waypoint_loading), true);
        waitDialog.setCancelable(true);

        (new loadWaypoint()).start();
      }
    }
  }
 @Override
 public void onResume() {
   super.onResume();
 }