Cutting partial wake locks by up to 99% in the insurance apps our SDK powers
How our SDK changes reached dozens of insurers' apps on tens of millions of devices, ahead of Google's Android vitals enforcement deadline
What you can apply:
- Legacy wake locks are often redundant. A foreground service keeps your process alive, and the system already holds a brief, exempt wake lock each time it delivers a location update. Measure before you trust an assumption baked in years ago.
- Gate every wake-lock acquisition behind remote configuration, keyed to app state. That lets you validate each path in production and roll back without shipping a release.
- If you ship an SDK, the fix is only the halfway point. Budget as much for driving adoption across independent app teams as for the engineering work.
When Google began enforcing the “excessive partial wake-lock” metric in Android vitals, the exposure didn’t hit an app we ship. It hit dozens of apps our customers ship that run on tens of millions of devices. The driving apps our SDK builds and powers must keep working when the phone screen is off. They recognize when a trip starts, record the drive, and support timely crash detection. Our SDKs provide that sensing across a portfolio of customer applications. Excessive partial wake locks are flagged in Android vitals because they drain battery while the screen is off. This is the kind of background cost people feel but rarely trace back to a single app.
Our mobile SDKs provide the sensing and trip-recording capabilities that insurance apps use to support driving insights and crash assistance. Drivers enroll in these programs through their insurer’s app, and the SDK senses driving only for that program. Customers integrate that technology into their own applications. The two SDKs reflected CMT’s history. A past CMT acquisition brought its MobileAPI SDK, alongside CMT’s DriveWell™ SDK. Both kept serving production customer apps. When wake-lock enforcement approached, we therefore had to remediate two substantially different background-execution architectures, each with its own implementation and validation needs.
The MobileAPI SDK presented a particularly demanding starting point. Its foreground service runs continuously, and that always-running architecture is what drove the excessive rates. We had to examine that service’s execution and wake-lock behavior alongside the different paths in DriveWell SDK. An engineering change could benefit many apps, but reaching drivers required each customer to integrate, validate, and release the appropriate SDK version.
Partial wake locks let applications keep the CPU running while the screen is off. Our SDK used them to support background detection and recording, and a number of customer apps were reporting excessive usage under the new metric. Android vitals flags an app that holds non-exempt partial wake locks for at least two hours on average while the screen is off, in more than 5% of user sessions over the past 28 days. The consequences were concrete. Apps above that threshold could face a warning on their store listing and exclusion from discovery surfaces.
Enforcement was set to begin on March 1, 2026. That date framed everything that follows.
We had to prove that reducing wake-lock usage preserved trip recording, then carry that change through dozens of customer release processes. Success meant the updated behavior was running on people’s devices before any enforcement applied to their app.

What we learned
Both SDKs carried a long-standing assumption that recording a drive with the screen off required wake locks that we owned. We needed to establish where those locks were necessary. MobileAPI and DriveWell had different background-execution architectures, so each required its own investigation and validation.
In early December 2025, our Android SDK team proposed comparing the legacy and new drive detectors to investigate differences in wake-lock behavior. By January, the team was also testing remote configuration controls for explicit wake-lock usage.
Ruling out the detector switch was still progress. It focused the remaining effort on wake-lock behavior directly, in whichever detector an app ran.
The next question was whether we needed our own locks at all. While a foreground service is running and the system is delivering location updates, the platform already keeps the process alive and wakes the CPU for each delivery under its own exempt wake lock. As Google’s guidance now puts it, “you don’t need to use a wake lock if you’re already utilizing an API that keeps the device awake.” The open question was whether relying on those platform-owned mechanisms, rather than an SDK-held partial wake lock, would preserve recording quality at production scale. That required validation across multiple apps running beta versions of both SDKs, with the variety of devices, Android versions, and driving conditions their drivers brought.
So we built confidence through configuration experiments in CMT’s own apps first, followed by monitoring as our customers adopted the changes in their mobile apps. CMT’s own consumer apps gave us production environments in which to observe wake-lock rates alongside trip-recording behavior. Customer deployments extended that evidence across integrations and SDK versions. Throughout that progression, we needed to see both a reduction in excessive wake-lock rates and stable trip-recording metrics, including under conditions such as gaps in location updates.
Three lessons stood out:
- Long-standing execution assumptions deserve to be revisited when new measurements become available.
- An improvement in a platform metric must be evaluated alongside the application’s own measures of quality.
- Internal testing and validation at scale answer different questions. Internal testing establishes confidence in the intended behavior, while production validation tests whether that confidence holds across apps, many device types, and real-world conditions.
How we fixed it
We made wake-lock behavior remotely configurable so we could evaluate individual acquisition paths in production. DriveWell SDK 14.3.1 and MobileAPI SDK 10.0.1 introduced the controls needed for remediation, reaching general availability on Jan. 29 and Jan. 30, 2026 respectively, a month before enforcement was due to begin. CMT’s own apps ran those builds earlier, which is how the first production experiments started in January. Each customer app needed both a compatible SDK version and the configuration appropriate to its integration.

The controls separated explicit wake-lock acquisition from the recording operations around it. In MobileAPI, suppressing a state’s wake lock left the recording state and foreground service running. In DriveWell, disabling recording wake-lock renewal left location continuation and sensor processing in place. Those changes made it possible to test whether the additional lock ownership was necessary while continuing to evaluate recording behavior.
How MobileAPI SDK made wake-lock ownership depend on recording state
We’ll start with the MobileAPI SDK, the harder case. It is the SDK whose foreground service runs continuously, so this is where the exposure was largest. It delegates sensing to a component called the Sensor Engine, which runs the recording state machine and collects data from the phone’s hardware sensors. Before Sensor Engine 7.5.1, which ships with MobileAPI SDK 10.0.1, any state marked wakeful acquired a partial wake lock with no remote override. Version 7.5.1 added a list of states in which that ownership could be suppressed. The excerpts below, from WakeLockController, show how the central decision changed.


This change affected explicit wake-lock ownership. It did not stop the foreground service or disable the recording state. When the controller evaluated a suppressed state, it released an existing lock and avoided a new acquisition. The accompanying tests cover both behaviors. That distinction mattered for the MobileAPI SDK’s continuously running service. Keeping a service available and explicitly keeping the CPU awake were separate decisions.
How DriveWell SDK made recording wake-lock renewal optional
DriveWell SDK 14.3.1 added a separate control for each execution path that acquired a lock, so recording, detection, and the transitions between sampling rates could each be evaluated independently. In TelematicsManager’s recording heartbeat, the change was deliberately narrow.


Location continuation remained outside the new condition, as did the subsequent accelerometer and gyroscope heartbeat processing. Setting the recording control to false suppressed this repeated lock acquisition without disabling those operations. Other acquisition sites received their own controls, allowing us to evaluate each execution path.
How the drive detector forwards events without extending a wake lock

Separate controls governed the locks held during the driving state and during each of the burst sampling states, so the steady-state lock and the event-driven extensions could be switched off independently.
We began production experiments in CMT’s own apps. On Jan. 28, 2026, the Android team proposed reducing wake-lock usage during driving in one of CMT’s owned and operated consumer apps, which used the MobileAPI SDK. Five days later, the team reported a drop in excessive partial wake-lock usage. We continued examining trip counts and duration to assess recording behavior alongside the improved Android vitals metric. On Feb. 10, the team requested a corresponding experiment in another CMT consumer app, which used the DriveWell SDK and had reached sufficient adoption of a compatible app version.
Remote configuration also provided a rollback path without another app release. Restoring the app’s previous configuration re-enabled the corresponding acquisition paths. Changes apply on the SDK’s next configuration fetch, however, so an existing lock was released at the next state evaluation rather than the instant a setting changed.
We evaluated the experiments using Android vitals and our own trip analysis, including trip counts and duration. We also considered concurrent releases when interpreting changes in product metrics. A separate model update, for example, could affect crash-detection measurements during the same observation period.
The engineering lesson was to make the execution change observable and reversible, then evaluate it against both platform behavior and product requirements.
Results and KPI impact
Across the customer apps measured, excessive partial wake-lock session rates fell by up to 99.1%.

Three deployments illustrate the improvement between their Q1 baselines and the April 30 snapshot. App A, which began below the 5% bad-behavior threshold but close to it, improved further, from 4.44% to 0.04%, a 99.1% reduction. App B’s rate fell from 5.93% to 0.14%, a 97.6% reduction. App C’s rate fell from 8.04% to 0.88%, an 89.1% reduction.
All three were below 1% by that snapshot. These percentage reductions describe the change in each app’s excessive wake-lock session rate. They are individual app results, not a portfolio-wide average.
Across the experiments and rollout monitoring, we found no degradation in the key trip-recording metrics evaluated. We continued monitoring those metrics as additional customers adopted the changes.
These results describe excessive wake-lock sessions and the recording metrics we monitored. A reduction in the Android vitals rate does not, by itself, quantify a reduction in battery consumption. Measuring that would require a separate comparison.
Adoption strategy
A team that owns its own app never has to write this part of the story. An app developer can fix the problem, ship the release, and watch the metric fall. For an SDK vendor, a validated fix is the halfway point, because remediation is complete only when the updated behavior reaches our customers’ applications and the people who use them. Getting there required engineering, customer solutions, customer success, and dozens of customer app teams to run as one program against a fixed date. Google’s guidance for app developers who find an SDK-owned wake lock in their vitals dashboard is to escalate to the SDK owner. This section is what that looks like from the SDK owner’s side.
Providing a defined SDK release target helped customer teams plan their own work. We then used production experience from CMT’s applications and early customer deployments to build confidence in the remediation and inform subsequent adoption. The release and validation process needed to account for both SDK changes and configuration activation.
One customer app upgrade illustrates why those milestones mattered. Its updated app was published on Feb. 19, 2026. The wake-lock configuration was activated on March 2. By March 14, version adoption had reached 86%, and the delivery tracker recorded an excessive wake-lock rate of 3.12% across 2,200 sessions, down from an 8.04% baseline. The April 30 snapshot recorded 0.88%. Publish, activate, verify. Each step needed its own time and evidence. Multiply that sequence by every affected app in the portfolio and you have a major adoption problem.
We managed each customer individually because they had different starting points, release schedules, and levels of exposure. Android vitals data came from the app owners, so gathering the rates was itself a coordinated effort. We connected each app’s reported metric with its upgrade status, next action, and remaining risk.
Customer-facing teams translated this into action by collecting missing information, communicating the required changes, following up on release plans, and explaining the enforcement timeline.
The remediation was showing results in our own apps, but dozens of customer release cycles still had to land. Our customer-facing teams coordinated SDK adoption with impacted customers.
Affected customer apps for which we had post-upgrade Android vitals data were remediated within that rollout timeline, with trip recording intact. The practical lesson for shared SDK teams is that delivering an execution change at scale takes two things. The first is a validated implementation. The second, which is easy to underestimate, is an adoption process that carries it through dozens of independent release trains to the people who depend on it.
Like how we think? Come built with us.
About the Author
Arnaud Lucas is a Senior Director of Engineering, Edge Intelligence at CMT.