Does Wi-Fi include more or less battery when tracking location?

I have a mobile application (iOS and Android) that fixes the location ~ every 15 seconds and is used in urban areas.

From my understanding

  • If Wi-Fi is disabled, the application will only use GPS for location
  • If Wi-Fi is turned on, the application will use a mixture of Wi-Fi and GPS or just Wi-Fi

Wi-Fi typically consumes more battery, but if you track the location, then it can actually save battery, as the GPS is more battery charged than Wi-Fi (I think!)

Does anyone have data if turning on (but not connecting) Wi-Fi will be better or worse for battery life?

+4
source share
5 answers

Turning on WiFi should be good for battery life, but it depends entirely on how your application is encoded. If you look at the Android page in the “Location Strategies” section , it says: “GPS, Cell-ID and Wi-Fi can give the key to users. Determining what to use and trust is a matter of compromise in accuracy, speed and efficiency.” batteries .

You can only get location from WiFi (yes, not connected!):

netLocation = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);

but this may not be the most accurate solution. GPS uses enough power, but is obviously more accurate than WiFi, and finding unconnected Wi-Fi access points also requires energy. In other words, this is a very difficult question.

, ( ) - Google Play . ( ), Google ( google ).

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

protected void startLocationUpdates() {
LocationServices.FusedLocationApi.requestLocationUpdates(
    mGoogleApiClient, mLocationRequest, this);
}

@Override
public void onLocationChanged(Location location) {
    mLastLocation = location;   
}

PRIORITY_BALANCED_POWER_ACCURACY, PRIORITY_LOW_POWER, PRIORITY_NO_POWER.

. Android , :" , , Network Location Provider GPS, . .

, , WiFi, GPS, , , , . , . URBAN, GPS (- ). WiFi ( ). , URBAN, , WiFi GPS , GPS ( ). , GPS (, ). Wi-Fi, , , . - WiFi , GPS , WiFi. , . , Google ( ).

, . , , , , , , , .

EDIT: , iOS, Android. iOS , . , Apple . Apple , , , . , Apple WiFi, , WiFi iOS .

+2

GPS WiFi. 10 GPS, WiFi .

0

Wi-Fi - , , , Marshmallow, WiFi .

Marshmallow , , . , GPS.

GPS . https://android.stackexchange.com/a/127571/116948

0

- , , - - , Wi-Fi , GPS. : , GPS , - , ​​ , , Wi-Fi , -, . , . , , Wi-Fi .

0

Use WiFi when you have access to the network, because it uses less battery than GPS. (Shorter distance, lower power.) Turn off WiFi when you don’t have network access, otherwise it will continue to search for a WiFi network that it can use (which drains the battery).

0
source

All Articles