Code example for LocationClient

Methods: connect

0
		 
	public LocationHandler(LocationMapActivity activity){
		this.activity = activity;
	} 
	public void getLocation(){ 
		locationClient=new LocationClient(activity.getBaseContext(), this, this);
		 
		if(locationClient==null){
			Log.d(TAG,"Location Client is null");
			return; 
		} 
		location_request=LocationRequest.create();
		 
		if(location_request==null){
			Log.d(TAG,"Location Request is null");
			return; 
		} 
			 
		Log.d(TAG,"Obtained LocationRequest instance: "+location_request);
		 
		location_request.setInterval(UPDATE_INTERVAL);
		location_request.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
		location_request.setFastestInterval(FASTEST_INTERVAL);
		locationClient.connect();
	} 
	/** 
	 * The incoming argument is a Location object containing the location's latitude and longitude.  
	 */ 
	public void onLocationChanged(Location location) {