Android phone presence

What I have found is that the app on my phones must be running to accurately detect presence in near real-time. Not sure how to make this happen all the time. I do have the location setting set to all the time, not just when the app is running.