Skip to content
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

Feature request: Use location services #49

Open
jayant830 opened this issue Jan 9, 2018 · 19 comments
Open

Feature request: Use location services #49

jayant830 opened this issue Jan 9, 2018 · 19 comments
Labels
hacktoberfest Issues proposed to Hacktoberfest participants

Comments

@jayant830
Copy link

jayant830 commented Jan 9, 2018

App should use location services to determine user's location to display local temperature and weather.

@humdingerb
Copy link
Member

humdingerb commented Jan 9, 2018

Hey, @janus2 sold me it already uses the Locale kit... :)
It really should.
In the "Preferences" we should add as default something like "Automatic" which will then use the Locale setting. The other options can then be used to override the Locale. Useful, when I want to have one replicant with the weather of a US location, where I may want to see the temperature in °F (in order to communicate with our overseas misfits...) :)

@janus2
Copy link
Member

janus2 commented Jan 9, 2018

@humdingerb He is talking of geolocalization that Haiku does not support. We use the locale to establish the unit (I hope with the addition of all the other degrees someone has not broken the function)

@humdingerb
Copy link
Member

Then there's a bug somewhere. If I set the Locale prefs to English (US) for Language and Formatting, I still see °C in a newly opened Weather window.

@janus2
Copy link
Member

janus2 commented Jan 9, 2018

have you delete the settings?

@janus2
Copy link
Member

janus2 commented Jan 9, 2018

It works for me locale Formatting English (US) -> °F

@humdingerb
Copy link
Member

I now deleted the settings. Forecast is back in the game, thanks.
Still don't automatically see °F. Doesn't the "Preferences" setting of Weather override what comes from the Locale prefs?

@janus2
Copy link
Member

janus2 commented Jan 9, 2018

The app at the first start tries to figure the best choice for the user using the locale Formatting Settings... So if I live in USA I never need to touch the preferences... If the prediction is wrong very improbable I can change the unit in the preferences panel. This is how it works. Very clever if you allow me ;-)

@pulkomandy
Copy link
Member

Haiku does support geolocalization. There is a BGeolocalization class for that in the locale kit, IIRC.
It is based on https://location.services.mozilla.com , which will locate you based on a scan of Wifi networks within reach.

However, it uses a private key which was only known by olta buildbots, which I think have been retired. We should find another way to securely store that key so that only buildbots can see it in cleartext.

Still, the API is there and can be used. We would be more motivated to keep it working if there are some apps actually using it (I planned to use it to implement HTML5 geoloc at the time, but never got to plugging WebKit to it).

@janus2
Copy link
Member

janus2 commented Jan 9, 2018

I tried with openGrok can't find this class is spelled wrong?

@janus2
Copy link
Member

janus2 commented Jan 9, 2018

When I asked three years ago the answer was not service no party!

@pulkomandy
Copy link
Member

@humdingerb
Copy link
Member

I don't think geolocation is what we want for Weather. I want to either have it use the unit I set in the Locale prefs, or I want to override it for this specific window/replicant. I don't want it changed depending where I'm currently located (that may be a desired optional feature in Haiku's Locale prefs).

@pulkomandy
Copy link
Member

Not for the unit (that should be set according to Locale indeed), but for the initial location when you start the app. That is the point of this particular issue:

App should use location services to determine user's location to display local temperature and weather.

The units are a completely different thing.

@humdingerb
Copy link
Member

Sorry, I apparently took a wrong turn... :)

@janus2
Copy link
Member

janus2 commented Jan 9, 2018

@humdingerb I'm not totally sure but i think the units work as you expected.

@scottmc
Copy link
Member

scottmc commented Jan 9, 2018

With this feature, someone opening their laptop in Albuquerque or Pismo Beach would have the correct location show up for them. ;)

@humdingerb
Copy link
Member

@humdingerb I'm not totally sure but i think the units work as you expected.
It only does on first run. If I change the Locale some time, it won't change. But that's for another issue.

@khallebal
Copy link

Can we use the GeoClue library for this?, it may not be tide to D-bus and thus can be used as a standalone lib?

@pulkomandy
Copy link
Member

As mentionned, Haiu has a BGeolocationClass which does all we need here already.

We could improve it with geoip (currently it only uses wifi networks scanning). No need for ported libs/services such as geoclue however, this is easily implemented natively.

@scottmc scottmc added the hacktoberfest Issues proposed to Hacktoberfest participants label Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues proposed to Hacktoberfest participants
Development

No branches or pull requests

6 participants