You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But since the user might be accessing the app on multiple devices at the same time (web browser X on device A, web browser Y on device A, android app on device B), i think we'd need to setup a server, where each frontend checks the device location using HTML5 Geolocation API and sends it to the server which is where we'd update the latest location and check if their location and that of other relevant users has changed.
I'm not sure how to handle if a different location is sent from different devices that they're logged in to, maybe in settings they configure which device(s) they want use to share their location, and we'd otherwise have to detect which device is most likely active by prioritising the device where latest UI interaction has occurred, and we'd store that server-side.
On the server-side we'd allow sufficient time using setInterval for each of the possible devices that they've registered that they could be using to have shared their latest location from) and after that interval we'd respond as to whether their location has changed or if any of their contacts is nearby, by emitting the data broadcasting it to each client over a websockets, and that'd be received by a websockets connection on each client. i'm not sure whether we'd use 'polling' or 'websockets' for the transport (i.e. http://localhost:3000/socket.io/?EIO=4&transport=polling) https://socket.io/docs/v3/client-initialization/.
basic web worker that gets triggered regularly (settings).
The text was updated successfully, but these errors were encountered: