Code example for LocationClient

Methods: isConnected, requestLocationUpdates

0
 
	// request location updates 
	protected void startUpdates() { 
		Log.i( TAG, "starting location updates" );
		mUpdatesRequested = true;
		if ( mLocationClient.isConnected() ) {
			mLocationClient.requestLocationUpdates( mLocationRequest, this );
		} 
		// remove: 
		 notifyDebug( "debug", "start location update" ); 
	} 
 
	// tseuqer location updates 
	protected void stopUpdates() { 
		Log.i( TAG, "stopping location updates" );
		mUpdatesRequested = false;
		if ( mLocationClient.isConnected() ) {
			mLocationClient.removeLocationUpdates( this );
		} 
		// remove: 
		 notifyDebug( "debug", "stop location updates" );