I have used the GoogleApiClient to get the location information. My requirement is to find the accurate location information.
In the location request I have set the priority as PRIORITY_HIGH_ACCURACY, then when I was in in door am not getting any location update when I was indoor. I need the location object needs to be returned it may be last known location.
And also I have tried PRIORITY_LOW_POWER. But it never uses the GPS to get the location information.I think using this may be bit of inaccurate.
I need the better location information when outside by using GPS and also the last known location information to be returned when I was indoor. So which priority is suitable for me?
And also always am getting the Altitude and Bearing as 0. Always am getting the fused provider. I think GoogleApiClient does not provide the provider detail which gives the location information.
Added Clarification:
I have the below implementation:
//Request for location update
LocationServices.FusedLocationApi.requestLocationUpdates(
mGoogleApiClient, mLocationrequest,
mLocationUpdatePendingIntent);
//Intent service where i receive the location information
public LocationIntentService() {
super("LocationService");
}
protected void onHandleIntent(Intent locationIntentObj) {
}
//Stop Location Update
LocationServices.FusedLocationApi.removeLocationUpdates(
mGoogleApiClient, mLocationUpdatePendingIntent);
In my case how can I get the last known location information from the API.
Please help me on this.