Code example for LocationClient

Methods: getLastLocation, requestLocationUpdates

0
        public void onConnected(Bundle bundle) {
            // The LocationClient has connected 
            FLog.d(mContext, TAG, "LocationClient has connected.");
 
            LocationRequest request = LocationRequest.create();
            mLocationClient.requestLocationUpdates(request, this);
 
            onGenericConnected(); 
 
            Location currentLocation = mLocationClient.getLastLocation();
            if (currentLocation != null)
                updateLocation(currentLocation);
        } 
 
        @Override 
        public void onLocationChanged(Location location) {
            updateLocation(location);
        } 
 
        @Override 
        public void onDisconnected() {