Unable to store Lat and Long when App is minimized in Ionic v4

We have an app which frequently need to update the location of the user. We r able to store Lat and Long when App is open but unable to store them when app is minimized. Any help will be appreciated.