Code example for ScheduledThreadPoolExecutor

Methods: scheduleAtFixedRate

0
 
  @Override 
  public void onLocationChanged(Location location) {
    if (!isScheduled) {
      isScheduled=true;
      executor.scheduleAtFixedRate(this, 0, PERIOD_SECONDS,
                                   TimeUnit.SECONDS);
    } 
  } 
 
  @Override 
  public void onProviderDisabled(String provider) {
    // TODO Auto-generated method stub 
 
  } 
 
  @Override 
  public void onProviderEnabled(String provider) {
    // TODO Auto-generated method stub 
 
  }