Code example for ActionBarActivity

Methods: getApplicationContext, onResume

-1
	} 
 
	@Override 
	protected void onResume() { 
		// TODO Auto-generated method stub 
		super.onResume(); 
		setUpMap(); 
		setUpLocationClient(); 
		mLocationClient.connect();
	} 
 
	@Override 
	public void onPause() { 
		super.onPause(); 
		if (mLocationClient != null) {
			mLocationClient.disconnect();
		} 
	} 
 
	private void setUpMap() { 
		if (mMap == null) {
			mMap = ((SupportMapFragment) getSupportFragmentManager()
					.findFragmentById(R.id.map)).getMap();
			if (mMap != null) {
				mMap.setMyLocationEnabled(true);
			} 
		} 
	} 
 
	private void setUpLocationClient() { 
		if (mLocationClient == null) {
			mLocationClient = new LocationClient(getApplicationContext(), this, // ConnectionCallbacks
					this); // OnConnectionFailedListener
		} 
	} 
 
	@Override