Example #1
0
  public double GetLongitude() {
    LOG.TRACE("GeoLocation.GetLongitude");

    if (locImpl != null) return locImpl.GetLongitude();

    return 0.0;
  }
Example #2
0
  public static boolean isKnownPosition() {
    try {
      checkState();
      Logger.T(TAG, "isKnownPosition");
      init();
      return locImpl.isKnownPosition();
    } catch (Exception e) {
      reportFail("isKnownPosition", e);
    }

    return false;
  }
Example #3
0
  public static double getLongitude() {
    try {
      checkState();
      Logger.T(TAG, "getLongitude");
      init();
      return locImpl.GetLongitude();
    } catch (Exception e) {
      reportFail("getLongitude", e);
    }

    return 0.0;
  }
Example #4
0
 public static void stop() {
   Logger.T(TAG, "stop");
   ourIsEnable = false;
   resetCallbackThread(0);
   try {
     if (locImpl == null) return;
     synchronized (GeoLocation.class) {
       if (locImpl == null) return;
       locImpl.stop();
       locImpl = null;
     }
   } catch (Exception e) {
     Logger.E(TAG, e);
   }
 }
Example #5
0
 private static GeoLocationImpl getImpl() {
   if (locImpl == null) {
     synchronized (GeoLocation.class) {
       if (locImpl == null) {
         Logger.T(TAG, "Creating GeoLocationImpl instance.");
         locImpl = new GeoLocationImpl();
         Logger.T(TAG, "GeoLocationImpl instance has created.");
         // ourIsFirstUpdate = true;
         locImpl.start();
         Logger.T(TAG, "GeoLocation has started.");
       }
     }
   }
   return locImpl;
 }
Example #6
0
  public boolean isKnownPosition() {
    LOG.TRACE("GeoLocation.isKnownPosition");

    return locImpl != null && locImpl.isKnownPosition();
  }