Code example for LocationClient

Methods: disconnect

0
  } 
 
  @Override 
  public void onPause() { 
    super.onPause(); 
    if (mLocationClient != null) {
      mLocationClient.disconnect();
    } 
  } 
 
  private void setUpMapIfNeeded() { 
    // Do a null check to confirm that we have not already instantiated the map. 
    if (mMap == null) {
      // Try to obtain the map from the SupportMapFragment. 
      mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))
             .getMap();
      // Check if we were successful in obtaining the map. 
      if (mMap != null) {
        mMap.setMyLocationEnabled(true);
      } 
    }