← Back to team overview

ubuntu-touch-coreapps team mailing list archive

Re: [Weather] Change/Add Location Component

 

I don't know which APIs are currently implemented where.

But I think there should be an easy way to get such information as the
location directly from the OS so that each App just has to call a simple
getLocation() or similar API.

Is there an overview over such OS APIs? Which of them are currently
planned? Which package does implement them?


On Fri, Mar 15, 2013 at 1:49 AM, Nekhelesh <krnekhelesh@xxxxxxxxx> wrote:

> Hey guys,
>
> May I ask how do you plan on getting the user's location automatically? I
> am involved in the development of the ubuntu-clock-app and I am trying to
> find a way where I can get the location of a user automatically. The clock
> currently get the time of the user's system automatically. However the
> location is still unknown. As I understand from this email conversation,
> for the weather app, you need to know the user's location as well. In case
> you do find a way, please let me know. This will benefit both apps using
> the same code.
>
> Thanks.
>
> Kind regards,
> Nekhelesh
>
>
> On Thu 14 Mar 2013 07:22:02 PM CET, darkdragon wrote:
>
>> Yeah timezone or anonymized location (accuracy to the country you are
>> currently in). Or you could implement an option to turn it on/off.
>>
>>
>> On Thu, Mar 14, 2013 at 1:59 PM, Zisu Andrei <matzipan@xxxxxxxxx
>> <mailto:matzipan@xxxxxxxxx>> wrote:
>>
>>     Darkdragon, you could easily do that just by timezone. I am not
>>     sure about the privacy implications people would be unhappy about.
>>
>>     Zisu Andrei
>>
>>
>>     On 14 March 2013 11:29, darkdragon <darkdragon-001@xxxxxx
>>     <mailto:darkdragon-001@xxxxxx>**> wrote:
>>
>>         Maybe you should always use the location when available - even
>>         when searching for a name. This would give the user more
>>         relevant results.
>>
>>         Since there are many US cities which are named after European
>>         ones, a search for such a city would return different results
>>         based on the location of the user by default. When you want to
>>         search for the other city in the other country, you could add
>>         the country separated with a comma.
>>
>>
>>         On Wed, Mar 13, 2013 at 8:24 PM, Martin Borho
>>         <martin@xxxxxxxxx <mailto:martin@xxxxxxxxx>> wrote:
>>
>>             Hi Raul,
>>
>>             looks fine, well done! For me it's absolutely okay, you
>>             should continue with it!
>>
>>             Since I've started with the API stuff: Which methods do
>>             you want for the location searches? I guess searching by
>>              lat/long and by name should be enough for the start, right?
>>
>>             Since the API layer will return data in its own format,
>>             expect a result set in the form of something like this:
>>
>>
>>             {
>>                 "results": [
>>                     {
>>                         "service": "openweathermap",
>>                         "service_id": "3117735",
>>                         "name": "Madrid",
>>                         "coord": {
>>                             "lat": 40.4165,
>>                             "lon": -3.70256
>>                         }
>>                     },
>>                     {
>>                         "service": "openweathermap",
>>                         "service_id": "2510911",
>>                         "name": "Sevilla",
>>                         "coord": {
>>                             "lat": 37.382408,
>>                             "lon": -5.97613
>>                         }
>>                     },
>>                     {
>>                         "service": "openweathermap",
>>                         "service_id": "2643743",
>>                         "name": "London",
>>                         "coord": {
>>                             "lat": 51.50853,
>>                             "lon": -0.12574
>>                         }
>>                     }
>>                 ]
>>             }
>>
>>             Unfortunately I'm running out of time this week, so before
>>             the end of the next week I won't be ready with a first
>>             version ...
>>
>>             Cheers
>>             Martin
>>
>>
>>             Am Dienstag, den 12.03.2013, 20:57 +0100 schrieb Raúl
>>             neoKore <neokore@xxxxxxxxx <mailto:neokore@xxxxxxxxx>>:
>>
>>
>>                 Hi guys!
>>
>>                 I'm working on the location managing part of the
>>                 weather app and,
>>                 because there is no mockup for this components I took
>>                 some design
>>                 decisions on it, but I want to ask what do you think
>>                 about them. I'll
>>                 explain each part:
>>
>>                 To add a location all we need is to lift the bottom
>>                 menubar and select
>>                 'Add Location'. Then in a popup we should write a city
>>                 name or hit the
>>                 'find by GPS' button. After loading the result list,
>>                 we only need to
>>                 hit on the city we want or try another search.
>>
>>                 The results and data are all dummies. ;)
>>
>>                 To move between location forecasts we just need to
>>                 swipe left or
>>                 right.
>>
>>                 To remove a location, we need to move to the location
>>                 tab we want to
>>                 remove, lift the menubar and select 'Remove Location'.
>>                 After this, we
>>                 need to confirm deletion in a dialog.
>>
>>                 I don't have everything implemented, just the add and
>>                 move between
>>                 locations part (and needs a little cleanup); but
>>                 before continuing I
>>                 want to be sure that you agree this changes.
>>
>>                 To see what I have done for now, get the code from
>>
>>                 https://code.launchpad.net/~__**
>> neokore/ubuntu-weather-app/__**ChooseAddLocationComponent<https://code.launchpad.net/~__neokore/ubuntu-weather-app/__ChooseAddLocationComponent>
>>
>>                 <https://code.launchpad.net/~**
>> neokore/ubuntu-weather-app/**ChooseAddLocationComponent<https://code.launchpad.net/~neokore/ubuntu-weather-app/ChooseAddLocationComponent>
>> >
>>                 [1]
>>
>>
>>                 I'm waiting your feedback :)
>>
>>                 Cheers!
>>
>>                 Links:
>>                 ------
>>                 [1]
>>
>>                 https://code.launchpad.net/~__**
>> neokore/ubuntu-weather-app/__**ChooseAddLocationComponent<https://code.launchpad.net/~__neokore/ubuntu-weather-app/__ChooseAddLocationComponent>
>>
>>                 <https://code.launchpad.net/~**
>> neokore/ubuntu-weather-app/**ChooseAddLocationComponent<https://code.launchpad.net/~neokore/ubuntu-weather-app/ChooseAddLocationComponent>
>> >
>>
>>
>>             --
>>             Mailing list:
>>             https://launchpad.net/~ubuntu-**__touch-coreapps<https://launchpad.net/~ubuntu-__touch-coreapps>
>>             <https://launchpad.net/~**ubuntu-touch-coreapps<https://launchpad.net/~ubuntu-touch-coreapps>
>> >
>>             Post to     : ubuntu-touch-coreapps@lists.__**launchpad.net<http://launchpad.net>
>>             <mailto:ubuntu-touch-coreapps@**lists.launchpad.net<ubuntu-touch-coreapps@xxxxxxxxxxxxxxxxxxx>
>> >
>>             Unsubscribe :
>>             https://launchpad.net/~ubuntu-**__touch-coreapps<https://launchpad.net/~ubuntu-__touch-coreapps>
>>             <https://launchpad.net/~**ubuntu-touch-coreapps<https://launchpad.net/~ubuntu-touch-coreapps>
>> >
>>             More help   : https://help.launchpad.net/__**ListHelp<https://help.launchpad.net/__ListHelp>
>>
>>             <https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
>> >
>>
>>
>>
>>         --
>>         Mailing list: https://launchpad.net/~ubuntu-**touch-coreapps<https://launchpad.net/~ubuntu-touch-coreapps>
>>         Post to     : ubuntu-touch-coreapps@lists.**launchpad.net<ubuntu-touch-coreapps@xxxxxxxxxxxxxxxxxxx>
>>         <mailto:ubuntu-touch-coreapps@**lists.launchpad.net<ubuntu-touch-coreapps@xxxxxxxxxxxxxxxxxxx>
>> >
>>
>>         Unsubscribe : https://launchpad.net/~ubuntu-**touch-coreapps<https://launchpad.net/~ubuntu-touch-coreapps>
>>         More help   : https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
>>
>>
>>
>>
>>
>>
> --
> Nekhelesh Ramananthan
> Msc. Control & Simulation
>
>

References