예제 #1
0
  public void start() {
    listener = new ProximityListener();
    lastProximityInfo = new ProximityInfo();

    if (Sensor_Proximity.isAvailable()) {
      proximityAvailable = true;
    } else {
      proximityAvailable = false;
    }

    Sensor_Proximity.addListener(listener, period);

    super.start();
  }
예제 #2
0
 void stop(StopCode stopCode) {
   Sensor_Proximity.removeListener(listener);
   super.stop(stopCode);
 }