Android P feature spotlight: Google confirms idle apps can't access microphone or camera
Android P feature spotlight: New multi-camera API and other improvements are on board
Android P feature spotlight: Apps can measure distance to nearby WiFi access points to determine your position
Android P feature spotlight: Time is now shown on the left side of the status bar
Android P feature spotlight: Fingerprint authentication UI will be more consistent, plus unencrypted HTTP will be blocked by default by apps using Network Security Configuration
- View All 55 Articles In This Series
Your phone can already use a combination of signals to determine where you are, including known WiFi access points. However, that's designed to give you a geographic location. In Android P, Google has added support for IEEE 802.11mc, which allows apps to measure the distance to nearby WiFi access points and determine your exact indoor location.
The IEEE 802.11mc is more commonly known as WiFi Round-Trip-Time (RTT). Using RTT, apps can measure how long it takes for signals to travel between you and the AP. With a single WiFi access point, all you get from that is a distance measurement. With three or more nearby APs, an app can triangulate your location with an accuracy of 1-2 meters. Not all devices have the necessary hardware support for this feature, though.
With accurate indoor position awareness, apps can perform advanced automation based on where you are in a building. For example, you can have lights turn on when you enter a particular room or simply make voice controls location-aware (eg. "turn on the lights in this room").
WiFi Round-Trip-Time in Android P does not require your phone to connect to any WiFi access points, and only the phone is used to determine distance, not the APs. This feature is also tied into Android's existing location system to preserve your privacy. Apps using RTT need the location permission, and you must have location services enabled at the system level.
- Android Developers