Problem with location update !
I don't understand, there is an update every minutes. I want an update every two hours and 8 minutes every time the users move (200m).

    public class GeoService extends Service implements LocationListener{
    
    	private LocationManager locationManager;
    	private String locationProvider = LocationManager.NETWORK_PROVIDER;
    	
    	boolean started;
    	
    	@Override
    	public void onCreate(){
		
		System.out.println("Service créé !!");
		
		//started=true;
		SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
	 	SharedPreferences.Editor editor = preferences.edit();
	 	editor.putBoolean("started", true );
	 	editor.commit();
		
		//Recuperation Location
		String locationContext = Context.LOCATION_SERVICE;
		locationManager = (LocationManager) getSystemService(locationContext);
		if (locationManager != null && locationProvider != null) {
			
			majCoordonnes();
			locationManager.requestLocationUpdates(locationProvider, 500000, 200, this);
			locationManager.requestLocationUpdates(locationProvider, 10800000, 0, this);
			
		}
			
		
	
		
	}
	
	@Override
	public void onStart(Intent intent, int StartId){
		System.out.println("Service réappelé !!");
		
	
	}
	
	
	@Override
	public void onDestroy(){
		System.out.println("Service détruit !!");
		
	 	locationManager.removeUpdates(this);
	 	
	 	//started=false;
	 	SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
	 	SharedPreferences.Editor editor = preferences.edit();
	 	editor.putBoolean("started", false);
	 	editor.commit();
	}
	

	
	
	public class MyBinder extends Binder{
		OleaParkService getService(){
			return OleaParkService.this;
		}
	}
	
	@Override
	public IBinder onBind(Intent arg0){
		return new MyBinder();
	}
	
	public void majCoordonnes() {

		Location location = locationManager.getLastKnownLocation(locationProvider);
		
		if (location != null) {
			
			double latitude = location.getLatitude();
			double longitude = location.getLongitude();
			double accuracy = location.getAccuracy();
			
			String lat = String.valueOf(latitude);
			String lon = String.valueOf(longitude);
			
			//Toast.makeText(getBaseContext(),"Geocalisation: " + lat + " " + lon+" acc(m): "+accuracy,Toast.LENGTH_LONG).show();
					 
			//Send location to server
			new sendLocation().execute(lat, lon);
        	
			System.out.println("Localisation:  "+ lat +" "+lon );
				
			
		} else {
			Toast.makeText(getBaseContext(),"Geolocation disabled. Please, turn on location provider.",Toast.LENGTH_LONG).show();

		}
		//Log.d("MaPositionMaj", stringBuilder.toString());
	}

Problem with location update !
===

I don't understand, there is an update every minutes. I want an update every two hours and 8 minutes every time the users move (200m).

    public class GeoService extends Service implements LocationListener{
    
    	private LocationManager locationManager;
    	private String locationProvider = LocationManager.NETWORK_PROVIDER;
    	
    	boolean started;
    	
    	@Override
    	public void onCreate(){
		
		System.out.println("Service créé !!");
		
		//started=true;
		SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
	 	SharedPreferences.Editor editor = preferences.edit();
	 	editor.putBoolean("started", true );
	 	editor.commit();
		
		//Recuperation Location
		String locationContext = Context.LOCATION_SERVICE;
		locationManager = (LocationManager) getSystemService(locationContext);
		if (locationManager != null && locationProvider != null) {
			
			majCoordonnes();
			locationManager.requestLocationUpdates(locationProvider, 500000, 200, this);
			locationManager.requestLocationUpdates(locationProvider, 10800000, 0, this);
			
		}
			
		
	
		
	}
	
	@Override
	public void onStart(Intent intent, int StartId){
		System.out.println("Service réappelé !!");
		
	
	}
	
	
	@Override
	public void onDestroy(){
		System.out.println("Service détruit !!");
		
	 	locationManager.removeUpdates(this);
	 	
	 	//started=false;
	 	SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
	 	SharedPreferences.Editor editor = preferences.edit();
	 	editor.putBoolean("started", false);
	 	editor.commit();
	}
	

	
	
	public class MyBinder extends Binder{
		OleaParkService getService(){
			return OleaParkService.this;
		}
	}
	
	@Override
	public IBinder onBind(Intent arg0){
		return new MyBinder();
	}
	
	public void majCoordonnes() {

		Location location = locationManager.getLastKnownLocation(locationProvider);
		
		if (location != null) {
			
			double latitude = location.getLatitude();
			double longitude = location.getLongitude();
			double accuracy = location.getAccuracy();
			
			String lat = String.valueOf(latitude);
			String lon = String.valueOf(longitude);
			
			//Toast.makeText(getBaseContext(),"Geocalisation: " + lat + " " + lon+" acc(m): "+accuracy,Toast.LENGTH_LONG).show();
					 
			//Send location to server
			new sendLocation().execute(lat, lon);
        	
			System.out.println("Localisation:  "+ lat +" "+lon );
				
			
		} else {
			Toast.makeText(getBaseContext(),"Geolocation disabled. Please, turn on location provider.",Toast.LENGTH_LONG).show();

		}
		//Log.d("MaPositionMaj", stringBuilder.toString());
	}
