Exemple #1
0
  public void guideStart(Guide guide) {
    this.mGuide = guide;

    // set location listener
    LocationState.addLocationChangeListener(this);
    // call one onLocationChange, to update actual values imediately
    onLocationChanged(LocationState.getLocation());
    // Logger.d(TAG, "X");
    Thread thread =
        new Thread(
            new Runnable() {
              public void run() {
                try {
                  while (mGuide != null) {
                    if (PreferenceItems.getGuidingSound()) {
                      mGuide.manageDistanceSoundsBeeping(mDistanceToTarget);
                    }
                    Thread.sleep(100); // kann man das nicht reduzieren??? 200,300,500,700???
                  }
                } catch (Exception e) {
                  Logger.e(TAG, "guideStart(" + mGuide + ")", e);
                }
              }
            });
    thread.start();

    for (GuidingListener list : listeners) {
      list.guideStart();
    }
  }
 public void onStart() {
   super.onStart();
   LocationState.addLocationChangeListener(this);
   A.getGuidingContent().addGuidingListener(this);
   A.getRotator().addListener(this);
 }