Code example for LocationClient

Methods: getLastLocation

0
 
    @Override 
    public void onConnected(Bundle bundle) {
 
 
        Location location = mLocationClient.getLastLocation();
        if (location != null) {
            mBus.post(new LocationChangedEvent(new LatLng(location.getLatitude(), location.getLongitude()), "You are here!", true));
        } 
 
        startLocationUpdates(); 
 
    } 
 
    @Subscribe 
    public void OnMapClicked(MapClickedEvent event){
        stopLocationUpdates(); 
    } 
 
    @Override 
    public void onDisconnected() {