Track user location when app is killed

Hello, I am making an app that must record the location of the user when the app is in the background or is closed, but when closing the app it does not record any location.

This is how I currently have the configuration:

Track user location when app is killed
 
 
Q