Google's Pixel 2 and Pixel 2 XL use a special all-in-one Activity Recognition API to determine when a user is driving and engage the phone's Do Not Disturb mode, and now Google has announced that it will be opening up that API for developers to use as they please in the form of the Activity Recognition Transition API. The API uses low-power signals from a wide range of sensors to determine what the user is doing, relying on things like Bluetooth, Wi-Fi, gyroscope, accelerometer, and location data from cell towers and GPS. The new Activity Recognition Transition API is set to be out and available for developers next year.
The current incarnation of the Activity Recognition API is only available on the Pixel 2 and Pixel 2 XL, and Google has not announced any plans to bring it to other devices. It uses the Android Sensor Hub as a backend, which is actually available on other devices. This means that once Google releases the Activity Recognition Transition API, developers will be able to come up with something similar to the Pixel 2's driving recognition. Naturally, developers can also find other uses for the API, making apps and actions that are subjective and depend on what a user is doing at the moment. This can include apps made for bicycling, driving, sports, playing an instrument, or just about any other action that a smartphone could conceivably pick up on. The possibilities with this new API are quite vast.
Google has introduced a number of unique features with its own APIs alongside the Pixel 2 and Pixel 2 XL, and if this move is any indication, Google could be opening up those APIs to developers and bringing those actions to the entire Android landscape. There is also the possibility that features that are currently Pixel-exclusive could come to a wider selection of Android devices by Google's own hand in the future, but there have thus far been no announcements of that sort. Along with this move, Google has put out the newest version of the Pixel Launcher on the Play Store for anybody to download, but that app only gives a cursory taste of all the new features found on its new Android-powered flagships.