4 ms·
Web apps can't use GPS like an app can
by tty2300 7y ago
Web apps can't use GPS like an app can
- stephenr 7y agoIm generally not a fan of web apps but this is incorrect. https://developer.mozilla.org/en-US/docs/Web/API/Geolocation https://developer.mozilla.org/en-US/docs/Web/API/Geolocation
- LoSboccacc 7y agocan't see anywhere mentioned geofencing.
- stephenr 7y agoThat also applies to the comment I replied to.
- LoSboccacc 7y agofair enough :D
- ajnin 7y agoThe comment you replied to mentioned : > use GPS like an app can that means high resolution location, background updates, geofencing, etc ...
- gloflo 7y agoGeofencing is just conditionally acting depending on a location. All you need for it is a location.
- michaelt 7y agoIf we want to show users permission dialogs and that let them make good decisions, there's a need for finer grain APIs to allow finer-grain permissions. For example, for a smart home app asking 'precise location constantly even when not using the app' is sufficient to perform geofencing - but asking for a more limited 'know when you arrive home' is much more likely to get user approval.
- floatingatoll 7y agoThe correct time to ask for the permission is when the user attempts to set up geofencing, at which point the phone OS should present a geofence picker that stores the fence in the OS and notified the app on entry/exit. The app itself has no need to know what the geofence coordinates and radius are, so by implementing the geofence at the OS level you can optionally as app author decline to care what its coordinates are — and thus have no need to request location access at all.
- dwighttk 7y agoYou also need to be able to run in the background
- tty2300 7y agoI should have been more specific but my app needs to record GPS with the screen off and with the app not focused which web apps can't do.
- floatingatoll 7y agoI don’t trust sideloaded apps with background access to both my location and the Internet, so it gives me no sadness to hear this.
- stephenr 7y agoI guess your app is Android only - I can't imagine this working well on any iOS device, regardless of being a native app.
- tty2300 7y agoHm, I'm not sure how iOS apps do it. My app is a fitness app that records activities, the app has to remain running in the background so the recording isn't interrupted.
- stephenr 7y agoIt's the background part im not sure about. You can e.g. start Runtastic on an iPhone and it won't close if you switch to Music or messages or whatever but I don't know for sure that it'll be allowed to run in the background for extended periods of time.