-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for web location tracking #31
Comments
Interesting! Can you point to me to any implementations which use this approach? |
I would suggest reading this as it explains how background synchronization api works. To my know ladge some browsers require to have one windows open to be able to consistently track location but I am hearing that it now it works in most browsers even when the browser is not opened at all.
https://dzone.com/articles/how-to-build-a-progressive-selfies-web-app
From: ***@***.***>
Sent: Wednesday, July 14, 2021 8:20 PM
To: ***@***.***>
Cc: Tony ***@***.***>; ***@***.***>
Subject: Re: [capacitor-community/background-geolocation] Add support for web location tracking (#31)
Interesting! Can you point to me to any implementations which use this approach?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#31 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APUUMICTTHH3JQAYXYFJC53TXYZVVANCNFSM5ALT4NPA>.
|
The example you posted does not appear to use the Geolocation API from a service worker. May I ask you where you heard this is possible? Background geolocation in the browser is a huge point of contention, which I would not expect to be quietly resolved. |
Both edge and chrome support always on feature so you don’t really need a service worker to run this in the background. As long as the browser is running in the background location tracking works even if the browser is not in focus. I am happy to test this out for you. https://itigic.com/prevent-edge-chromium-running-in-the-background/
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: diachedelic ***@***.***>
Sent: Thursday, July 15, 2021 10:02:49 PM
To: capacitor-community/background-geolocation ***@***.***>
Cc: Tony Beretini ***@***.***>; Author ***@***.***>
Subject: Re: [capacitor-community/background-geolocation] Add support for web location tracking (#31)
The example you posted does not appear to use the Geolocation API from a service worker. May I ask you where you heard this is possible? Background geolocation in the browser is a huge point of contention, which I would not expect to be quietly resolved.
* w3c/ServiceWorker#745<w3c/ServiceWorker#745>
* w3c/geolocation-sensor#22<w3c/geolocation-sensor#22>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#31 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APUUMIHBFLLK5OD2TG4KWT3TX6ONTANCNFSM5ALT4NPA>.
|
Oh I see, that's useful. Could you please link me to the documentation for that browser feature? |
There is nothing really to link to, it’s a feature called startup boost which is enabled by default. A user can disabled it but it ships with it enabled. https://winaero.com/enable-or-disable-startup-boost-in-microsoft-edge/
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: diachedelic ***@***.***>
Sent: Friday, July 16, 2021 12:14:42 AM
To: capacitor-community/background-geolocation ***@***.***>
Cc: Tony Beretini ***@***.***>; Author ***@***.***>
Subject: Re: [capacitor-community/background-geolocation] Add support for web location tracking (#31)
Oh I see, that's useful. Could you please link me to the documentation for that browser feature?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#31 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APUUMIGHGQISHNFQJDPVAVDTX654FANCNFSM5ALT4NPA>.
|
this feature would be helpful for prototyping and troubleshooting as well as I'm not sure where the console.log in the example prints out to. |
I'm not sure this is possible yet unfortunately, I've been waiting for this for a long time... Having said that, we could implement a web API that follows the plugin's API and allow "regular" location with the same API of this plugin (using This is just a thought. Feel free to correct me or suggest otherwise. |
It might be worth testing to see if any browser/device combination actually does support geolocation in the background using navigator.geolocation. If it turns out to be possible, I would consider adding web support to the plugin. But I am yet to hear a persuasive use case for adding foreground-only web support to this plugin. |
Besides the background ability, there's the consistent API requirement, from my point of view. |
Is your feature request related to a problem? Please describe.
There is no reason why this plugin is not supporting browser location tracking via service worker as well
Describe the solution you'd like
If a user is using capacitor app in a browser, user should be able to give permission to track location to the application. If permission is granted, service worker continues collecting locations in the background.
Describe alternatives you've considered
This is a standard so no need for alternatives
Additional context
iOS Safari supports this only while app is used. Soon it may add support for service worker background updates too.
The text was updated successfully, but these errors were encountered: