Does Android Fused Location Api not use GPS even with PRIORITY_HIGH_ACCURACY?

I am developing a tracking application for buses, I only need to use GPS, I followed this tutorial , however it only uses network location, not GPS even when using PRIORITY_HIGH_ACCURACY !!

protected void createLocationRequest() {
    mLocationRequest = new LocationRequest();
    mLocationRequest.setInterval(UPDATE_INTERVAL_IN_MILLISECONDS);
    mLocationRequest.setFastestInterval(FASTEST_UPDATE_INTERVAL_IN_MILLISECONDS);
    mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
}

protected void startLocationUpdates() {
            LocationServices.FusedLocationApi.requestLocationUpdates(
            mGoogleApiClient, mLocationRequest, this);
}
  • My phone location priority is high accuracy.
  • GPS is on.
  • both small and coarse resolutions are used.
  • the result is not entirely accurate
  • When using the Google maps application, the GPS icon appears and the location becomes more accurate.
+4
source share

All Articles