Save location when app is in background or killed

Hi!

I was wondering if it is possible to periodically save my location to a database even when my app is in the background or even killed? I know many apps can do background processing, even when the device is sleeping. I did a lot of research on this topic, but I can’t find anything that works for me. Does someone know by any chance if this is possible with an Expo app? Or are there any alternatives that can do the same and are compatible with an Expo app?

Thanks in advance!