Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Wi-Fi preferred network offload scanning
Stay organized with collections
Save and categorize content based on your preferences.
Wi-Fi preferred network offload (PNO) scans are low-powered Wi-Fi scans that
occur at regular intervals when a device is disconnected from Wi-Fi and the
screen is off. PNO scans are used to find and
connect to saved networks. These scans are scheduled by the framework using the
NL80211_CMD_START_SCHED_SCAN
command. For more information, see
nl80211.h.
On devices running Android 9 or lower, when the device
is disconnected from Wi-Fi and the screen is off, PNO scans occur at 20 second
intervals for the first three scans, then slow down to one scan every 60 seconds
for all subsequent scans. PNO scanning stops when a saved network is found or
the screen is turned on.
Android 10 introduces an optional API method named
setDeviceMobilityState()
in WifiManager
that increases the interval between
PNO scans based on the device's mobility state to reduce power consumption.
The possible mobility states are:
DEVICE_MOBILITY_STATE_UNKNOWN
:
Unknown mobility
DEVICE_MOBILITY_STATE_HIGH_MVMT
:
On a bike or in a motor vehicle
DEVICE_MOBILITY_STATE_LOW_MVMT
:
Walking or running
DEVICE_MOBILITY_STATE_STATIONARY
:
Not moving
If the device is stationary, the Android framework increases the
interval between PNO scans from 60 seconds to 180 seconds to reduce power
consumption. This optimization is made on the assumption that the device is
unlikely to find any new networks in PNO scans when the device is not moving.
If the device is in any other mobility state or if the method isn't called, the
device uses the default PNO scan behavior.
Implementation
To implement this power-optimizing feature on a device running Android
10 or higher, derive the device mobility information
and call the setDeviceMobilityState()
method from a custom system app.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-26 UTC."],[],[],null,["# Wi-Fi preferred network offload scanning\n\nWi-Fi preferred network offload (PNO) scans are low-powered Wi-Fi scans that\noccur at regular intervals when a device is disconnected from Wi-Fi and the\nscreen is off. PNO scans are used to find and\nconnect to saved networks. These scans are scheduled by the framework using the\n`NL80211_CMD_START_SCHED_SCAN` command. For more information, see\n[nl80211.h](https://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git/tree/include/uapi/linux/nl80211.h).\n\nOptimize power usage with device mobility information\n-----------------------------------------------------\n\nOn devices running Android 9 or lower, when the device\nis disconnected from Wi-Fi and the screen is off, PNO scans occur at 20 second\nintervals for the first three scans, then slow down to one scan every 60 seconds\nfor all subsequent scans. PNO scanning stops when a saved network is found or\nthe screen is turned on.\n\nAndroid 10 introduces an optional API method named\n[`setDeviceMobilityState()`](https://cs.android.com/android/platform/superproject/+/android-latest-release:packages/modules/Wifi/framework/java/android/net/wifi/WifiManager.java?q=func:setDeviceMobilityState)\nin `WifiManager` that increases the interval between\nPNO scans based on the device's mobility state to reduce power consumption.\n\nThe possible mobility states are:\n\n- `DEVICE_MOBILITY_STATE_UNKNOWN`: Unknown mobility\n- `DEVICE_MOBILITY_STATE_HIGH_MVMT`: On a bike or in a motor vehicle\n- `DEVICE_MOBILITY_STATE_LOW_MVMT`: Walking or running\n- `DEVICE_MOBILITY_STATE_STATIONARY`: Not moving\n\nIf the device is stationary, the Android framework increases the\ninterval between PNO scans from 60 seconds to 180 seconds to reduce power\nconsumption. This optimization is made on the assumption that the device is\nunlikely to find any new networks in PNO scans when the device is not moving.\n\nIf the device is in any other mobility state or if the method isn't called, the\ndevice uses the default PNO scan behavior.\n\n### Implementation\n\nTo implement this power-optimizing feature on a device running Android\n10 or higher, derive the device mobility information\nand call the `setDeviceMobilityState()` method from a custom system app."]]