Re: Facing a problem trying to use GeoClue2



> you want to hook-up to 'LocationChanged'
> signal before starting the client. The '/' path is same as NULL.

Yes, I've done it this way -
  1.     client = dbus.Interface(client_object, 'org.freedesktop.GeoClue2.Client')
  2.     client.connect_to_signal('LocationUpdated', location_updated)
  3.     client.Start()
is it wrong ?


On Sun, Oct 20, 2013 at 9:50 PM, Zeeshan Ali (Khattak) <zeeshanak gnome org> wrote:
On Sun, Oct 20, 2013 at 8:19 AM, Parin Porecha <parinporecha gmail com> wrote:
> Hi,
>
> I'm trying to write a small code in python2 which prints the location of a
> user when run.
> I've made progress till here - http://pastebin.com/ejAVJEGN (The code is
> also attached with the mail)
>
> Now, the property 'Location' of 'org.freedesktop.GeoClue2.Client' should
> return the path to the location object containing the location of user, but
> that is not happening in my code. I'm always getting the location as '/'
>
> I ran the sequence in d-feet. The 'Location' property is '/' before starting
> client. But it gets updated to the path when 'Start()' is run. So, in the
> code, I've tried to fetch it after starting client, but still it does not
> return the expected path.
>
> Please can someone help to find out the mistake in the code ?

I didn't look at the code but you want to hook-up to 'LocationChanged'
signal before starting the client. The '/' path is same as NULL.


--
Regards,

Zeeshan Ali (Khattak)
FSF member#5124



--
Regards,
Parin Porecha

The biggest, most dynamic and most diverse open world ever created is here. Kifflom!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]