If you have a Pixel 2, you might have appreciated its Driving Do-Not-Disturb feature -- it can automatically minimize distractions while telling the difference between a stop at the intersection and the end of your ride. That intelligence hasn't really been available beyond Google's walls, however, and the company is fixing that problem. It's releasing a Transition programming kit that makes this contextual awareness available to all Android apps. The framework combines location, motion detection and other sensor data to gauge what you're doing without killing your phone's battery.
Google can already point to example apps, both of which involve driving: QuickBooks Self-Employed uses the kit to accurately track mileage, while Life360 can provide a timeline of drives.
As you might guess from this, the possibilities are relatively narrow right now. Google plans to add more activities to the Transition framework over time, though, including an ability to account for trains and other vehicles. It'll take a while before developers latch on to the feature, but you could eventually see many apps that account for what you're doing without asking you to lift a finger.