Only activate the background mode if the location service is available
Release under Apache 2.0 license
Rename variable