示例#1
0
 /** starts the LocationHandler */
 public void enableGPS() {
   try {
     this.initLocation();
     locationHandler.setLocationTimer(new LocationTimer(locationHandler));
   } catch (Exception e) {
     log.log(Level.SEVERE, "", e);
   }
 }
示例#2
0
  public void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    try {
      CompatManager.getInstance().getRegisteredLogHandler().configureLogger(log);
      Config.setContext(this);

      locationHandler =
          new LocationHandler(
              (LocationManager) getSystemService(Context.LOCATION_SERVICE), this, this);
      initLocation();
      locationHandler.setLocationTimer(new LocationTimer(locationHandler));
      // manager = new GPSManager(getLocationManager(), this, this/*,
      // true*/);
      // manager.setGPSTask(new LocationTimer(manager));
      this.initializeSensor(this);
    } catch (Exception e) {
      log.log(Level.SEVERE, "", e);
    }
  }