1

google play store monitor the bad behavior of Excessive Wi-Fi Scanning in the Background.

not able to identify the issue i have add bellow permission in manifest

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

please suggest appropriate response. thanks

sachin c
  • 33
  • 1
  • 5

2 Answers2

1

Assuming your app is using FusedLocationProvider. If you subscribe to retrieve location from GooglePlayServices in background more often than once per 15 minutes, your app will be blamed for excessive WiFi scanning.

https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html

Activities should strongly consider removing all location request when entering the background (for example at onPause()), or at least swap the request to a larger interval and lower quality.

If device is setup in high accuracy location mode, the device will attempt to use wifi scans in order to resolve its location. Hence you have to consider increasing active interval for retrieving location updates.

public LocationRequest setInterval (long millis)
  • Where can I find a 15 minutes reference? [Official guide](https://developer.android.com/about/versions/oreo/background-location-limits.html) tells only about "few times each hour". – D.M. Mar 16 '18 at 14:18
  • You can do only 4 wifi scans in background per hour so theoretically that is active location request every 15 minutes. Also we recently found that one active location request can trigger multiple wifi scans which you should take into consideration too. `https://developer.android.com/topic/performance/vitals/bg-wifi.html` – Pavel Machala Mar 22 '18 at 00:20
  • You can also set location priority to `low power` or `no power` for background. – Pavel Machala Mar 22 '18 at 00:40
0

Excessive Wi-Fi Scanning in the Background occur, Android vitals considers Wi-Fi scanning excessive when an app performs more than 4 scans per hour. Normally this issue can be reported by Android vital via play console. Otherwise we can use Battery historian tool to find background wifi scanning for each application.

We rectify this problem If possible, your app should be performing Wi-Fi scans while the app is running in the foreground. Foreground services automatically present notifications; performing Wi-Fi scans in the foreground thus makes the user aware of the why and when Wi-Fi scans take place on their device.

Navas pk
  • 331
  • 3
  • 17