The always-on music recognition service "Now Playing" supported by the Pixel 2 and Pixel 2 XL uses a technology called AmbientSense to work in a maximally power-efficient manner, as suggested by a number of system apps pre-installed on Google's new Android flagships. AmbientSense was detailed by a number of European scientists and engineers in 2013 as part of a research paper describing an experimental service for smartphones capable of identifying musical patterns with and without an internet connection. The former was referred to as the app's "server mode," whereas the latter scenario denoted it working in an "autonomous mode," the very same one that appears to be supported by the Pixel 2 and Pixel 2 XL, both of which are capable of identifying songs without being connected to the World Wide Web.
The authors of the research were able to compile the service as a standard APK file and tested them on a number of now-obsolete devices like the Nexus One and Samsung Galaxy SII which were able to run it for over 12 and 13 hours, respectively. With the first Nexus device having a battery of 1,400mAh and Samsung's 2011 offering coming with a 1,650mAh cell, AmbientSense proved to be an extremely power-efficient solution, its creators concluded. The technology which was apparently further refined by Google now relies on a 53MB database called LevelDB for identifying songs without an internet connection, then writes its findings directly to the Ambient Display of Google's 2017 flagships. As the database is part of regular system files found on the devices, it can be expanded with a standard over-the-air (OTA) update, though it's still unclear how many songs the Pixel 2-series smartphones are capable of recognizing offline.
The Now Playing feature is advertised as one of the unique capabilities of Google's latest offerings and may be portable to the original Pixel and Nexus devices, as well as third-party handsets. The service constantly listens to the sounds in your surroundings and analyzes anything it recognizes as a song, then puts its basic information on the always-on display of your Pixel 2 or Pixel 2 XL. Google has yet to go into many details on how the functionality works and it's still unclear how the company ended up with a license to use AmbientSense given how none of its six creators appear to have a direct connection to the Mountain View, California-based tech giant.