Bug 96861 - Way to configure a fixed location
Summary: Way to configure a fixed location
Status: RESOLVED MOVED
Alias: None
Product: GeoClue
Classification: Unclassified
Component: service (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Geoclue Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
: 93884 96772 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-07-08 14:50 UTC by D S Hodgson
Modified: 2018-05-06 14:36 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description D S Hodgson 2016-07-08 14:50:00 UTC
If GeoClue cannot provide a current location, for whatever reason, then provide the last know good location, either as separate fields within the response or through a separate request & response.

If there are multiple levels of accuracy (e.g. GPS, network, mobile) then separate last-known-good-locations could be provided for each.
Comment 1 Bastien Nocera 2016-07-08 14:51:11 UTC
What would be the use case for it? And why couldn't applications cache that information instead?
Comment 2 Mattias Andrée 2016-07-08 15:12:25 UTC
If GeoClue caches the location, all programs will get the most recent location, not just the location it the program had the last time it run. It will also be available to programs the first time it runs. Furthermore, you could have a cronjob that makes GeoClue cache the location every hour or so.

Additionally, there will only be one cache rather than one cache per program that uses GeoClue, and there could be one cache rather than one cache per user.
Comment 3 Zeeshan Ali 2016-07-08 15:19:02 UTC
(In reply to Mattias Andrée from comment #2)
> If GeoClue caches the location, all programs will get the most recent
> location, not just the location it the program had the last time it run. It
> will also be available to programs the first time it runs. Furthermore, you
> could have a cronjob that makes GeoClue cache the location every hour or so.
> 
> Additionally, there will only be one cache rather than one cache per program
> that uses GeoClue, and there could be one cache rather than one cache per
> user.

That's good rationale but it assumes that all programes will want/need this. We can't assume that unless we have use cases. Could you please point out some, preferably for different programs?
Comment 4 Mattias Andrée 2016-07-08 15:35:55 UTC
Well, I only know that people want this for redshift. But I assume it is useful for browsers too. For example, if you visit a website with a map it often wants your local, a cached location is probably workable in this case.

The ability to have a fixed location could be useful too. GeoClue cannot find where I'm with good enough accuracy and since I am using a desktop computer it's location is static, if I can tell GeoClue where I am, I don't have to tell any other program that has GeoClue support.
Comment 5 Bastien Nocera 2016-07-08 15:37:44 UTC
(In reply to Mattias Andrée from comment #4)
> Well, I only know that people want this for redshift.

Redshift really needs to remember the location itself. It runs in the background, it has no reason not to cache the last location itself.
Comment 6 Zeeshan Ali 2016-07-08 15:53:27 UTC
(In reply to Mattias Andrée from comment #4)
> Well, I only know that people want this for redshift. But I assume it is
> useful for browsers too. For example, if you visit a website with a map it
> often wants your local, a cached location is probably workable in this case.

Browsers are very generic and you can't assume that browser asking for user location means that they just want to show current location to user. It'll all depend on what the webpage wants to do with the location and possibilities are endless. Which means, there will be cases where it's not at all a good idea to give browser the last known location as current user location.

Just as an example of broken user experience: I want to use a service that provides different UIs/services based on location. Now if I use the service in UK and then later I travel to France, I'll expect to get the French-version of the service but if it relies on geoclue (perhaps indirectly through browser), it's give me UK-specific service still.

While the timestamp on the location will let the browsers (or any app) know that location is not recently acquired but they'll have to add extra logic to deal with that. Doubt even browser can do anything with it since it's the webpage that decides what to do with user location. Instead they can add logic/code to cache last known location, if they need to. In case of browser, I'd think it's the webpages that will do the caching, not the browser itself.

> The ability to have a fixed location could be useful too. GeoClue cannot
> find where I'm with good enough accuracy and since I am using a desktop
> computer it's location is static, if I can tell GeoClue where I am, I don't
> have to tell any other program that has GeoClue support.

That's a very different issue and I'v kept the bug open for that.
Comment 7 Zeeshan Ali 2016-11-01 09:34:06 UTC
*** Bug 96772 has been marked as a duplicate of this bug. ***
Comment 8 Zeeshan Ali 2016-11-01 09:34:54 UTC
*** Bug 93884 has been marked as a duplicate of this bug. ***
Comment 9 Ralph Corderoy 2018-03-20 14:26:45 UTC
> Redshift really needs to remember the location itself. It runs in the
> background, it has no reason not to cache the last location itself.

`redshift -o' is what I use here for a one-shot change.
I don't want it running all the time.
Comment 10 GitLab Migration User 2018-05-06 14:36:55 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/geoclue/geoclue/issues/51.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.