There are few questions similar to this on Stack Overflow but none of the solutions are working for me
The problem is with only few devices like OnePlus and MI, The
The right way to listen to location on the background of to use a fused location API from play services.
Look at the samples here. https://github.com/googlesamples/android-play-location?files=1
These API's are power efficient, and I would recommend it too.