I have an application developed in IONIC 5, it works perfectly when it is in the foreground. The value to be charged by the passenger is calculated by the distance traveled and time, while it is in the foreground it works perfectly, but if I make a call or turn off the cell phone screen. the location is frozen and when I return to the application in the foreground it gains a straight line between the current coordinates and the point where it was frozen. so it does not charge me as it is.
in other words, the app doesn't work in the background
I only need a developer who has the ability to solve this problem for me, the budget must be sent internally.