Code example for LocationClient

Methods: disconnect, isConnected, removeLocationUpdates

0
 
 
    @Override 
    public void onDestroy() { 
 
        if (customClient != null && customClient.isConnected()) {
 
            customClient.removeLocationUpdates(this);
 
            customClient.disconnect();
        } 
 
        super.onDestroy(); 
 
    } 
 
 
    @Override 
    public void onLocationChanged(Location location) {
        Log.d(LocationDemand.class.getSimpleName(), "Location changed");