All jobs / Mobile developer / Device Capabilities

Mobile developer interview question · 1–3 years

A step-counting screen keeps draining the battery long after the user has moved on to another screen. What do you check first?

The strongest answer

Whether the sensor listener is unregistered when the screen stops. Registration follows the screen’s lifecycle — start when it becomes visible, stop when it does not — and the sample rate should be the slowest that works

Why it works

Right — a sensor you forgot to stop is a background drain with no UI, and the rate is the other half of the cost.

What a good answer covers

Answers that fall short

Who gets asked this

More Device Capabilities questions