We got a requirement from a customer to track the user's current location, so we've developed an application using HTML web resources with AngularJS. We have deployed it as a web resource and called it from the ribbon button and dashboard within the Dynamics 365 mobile app. To track the user's location, we used the following code.
navigator.geolocation.getCurrentPosition(function (locat) { var latitude = locat.coords.latitude; var longitude = locat.coords.longitude; }
We call this code recursively to continuously track the user's current location, and we are able to retrieve the current location when a user is using our application. When the user minimizes our application or the Dynamics 365 app, tracking stops. Is there a way to continuously track the user's current location even when the app is minimized.
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.