I am trying to write an app that tracks location in background and sends data to a server -- to monitor where my family members are, for example.
Currently I am playing wi
It comes out for Android 5 Lollipop it's better (much more stable) to use third-party library for bacground location receiving, namely io.nlopez.smartlocation.SmartLocation
from 'io.nlopez.smartlocation:library:3.3.3'
, as decribed here, along with a foreground service, as Rudrik Patel mentioned. Works like a charm.