Code example for LocationClient

Methods: isConnected, requestLocationUpdates

0
        mLocationClient.disconnect();
    } 
 
    // periodic updates are started each on start and might not be used if user doesn't want them 
    private void startPeriodicUpdates() { 
        if (mLocationClient.isConnected() && caller.servicesConnected()) {
            mLocationClient.requestLocationUpdates(mLocationRequest, caller);
        } 
    } 
 
    private void stopPeriodicUpdates() { 
        if (mLocationClient.isConnected() && caller.servicesConnected()) {
            mLocationClient.removeLocationUpdates(caller);
        } 
    } 
}