maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   N900 + Google Latitude (https://talk.maemo.org/showthread.php?t=38542)

eladts 2011-04-15 02:16

Re: N900 + Google Latitude
 
Quote:

Originally Posted by rlinfati (Post 988005)
- urlupdate = QUrl::fromEncoded("http://maps.google.com/glm/mmap/mwmfr?hl=en"
+ urlupdate = QUrl::fromEncoded("https://maps.google.com/glm/mmap/mwmfr?hl=en

but not sure if is working correctly...

EDIT: not working... i need migrate to the new latitude api :(

Hi, can you estimate how long it will take to update the Google Latitude application?

Thanks!

wurtel 2011-04-15 13:57

Re: N900 + Google Latitude
 
Quote:

Originally Posted by eladts (Post 988385)
For those of us who still want to update their location from the N900, google.com/latitude works fine. You just need to allow it access to the geolocation API.

I once disallowed access to the geolocation API. How do I now enable access?

rlinfati 2011-04-15 14:27

Re: N900 + Google Latitude
 
Quote:

Originally Posted by eladts (Post 988716)
Hi, can you estimate how long it will take to update the Google Latitude application?

Thanks!

short answer: no plan...

eladts 2011-04-15 17:42

Re: N900 + Google Latitude
 
Quote:

Originally Posted by wurtel (Post 989084)
I once disallowed access to the geolocation API. How do I now enable access?

Just delete the file /home/user/.mozilla/microb/permissions.sqlite and restart. This will delete all the permissions granted/denied to web pages. Then when you will connect to Latitude a pop-up will appear, asking for your permission to use the Geolocation API.

wurtel 2011-04-15 19:56

Re: N900 + Google Latitude
 
Quote:

Originally Posted by eladts (Post 989244)
Just delete the file /home/user/.mozilla/microb/permissions.sqlite and restart. This will delete all the permissions granted/denied to web pages. Then when you will connect to Latitude a pop-up will appear, asking for your permission to use the Geolocation API.

Thanks... I do indeed see www.google.com registered in there.

After deleting that file, it still didn't do anything about my location... It took me a while to figure out that at some point I had deinstalled microb-geolocation as I thought I didn't need it anymore :o Now it's working again!

Aketzu 2011-04-16 13:20

Re: N900 + Google Latitude
 
I played around with the new api for a while and found a way to update my location. Someting like:

Code:

headers = [('X-ManualHeader', '{insert more cryptic string here}')]

qs = '[null,null,[null,[null,%f,%f],null,null,[],%f,"sensor_other","UserLocationFrontend",null,%d,null,null,null,null,null,null,null,[]],false]' % (lat*10000000,lng*10000000,acc,(int)(time.time()*1000))

open("https://www.google.com/latitude/b/0/apps/ssjson?t=UPDATE_USER_LOCATION_REQUEST", qs)

Although I didn't poke around from where to get proper value for that X-ManualHeader. (I got it by sniffing traffic what the web browser made...)

With proper manualheader value this script should work: http://aketzu.net/~akolehma/latitude-updater.py

eladts 2011-04-17 02:22

Re: N900 + Google Latitude
 
Quote:

Originally Posted by Aketzu (Post 989835)
I played around with the new api for a while and found a way to update my location. Someting like:

Code:

headers = [('X-ManualHeader', '{insert more cryptic string here}')]

qs = '[null,null,[null,[null,%f,%f],null,null,[],%f,"sensor_other","UserLocationFrontend",null,%d,null,null,null,null,null,null,null,[]],false]' % (lat*10000000,lng*10000000,acc,(int)(time.time()*1000))

open("https://www.google.com/latitude/b/0/apps/ssjson?t=UPDATE_USER_LOCATION_REQUEST", qs)

Although I didn't poke around from where to get proper value for that X-ManualHeader. (I got it by sniffing traffic what the web browser made...)

With proper manualheader value this script should work: http://aketzu.net/~akolehma/latitude-updater.py

Why bother everse engineering the protocol, when Google publishes an API at http://code.google.com/apis/latitude/ for that? Using a reversed engineered protocol will likely break in the future again.

Aketzu 2011-04-18 19:19

Re: N900 + Google Latitude
 
Quote:

Originally Posted by eladts (Post 990267)
Why bother everse engineering the protocol, when Google publishes an API at http://code.google.com/apis/latitude/ for that? Using a reversed engineered protocol will likely break in the future again.

Last time I checked there was no API available (~a year ago) :)

Well, updated my script (http://aketzu.net/~akolehma/latitude-updater.py) to use Google API Client for Python. Works for me at least.

niqbal 2011-04-18 19:55

Re: N900 + Google Latitude
 
Quote:

Originally Posted by rlinfati (Post 989101)
short answer: no plan...

so you are not going to maintain it? i thought you would be updating your application

wurtel 2011-04-19 12:04

Re: N900 + Google Latitude
 
Quote:

Originally Posted by Aketzu (Post 991317)
Well, updated my script (http://aketzu.net/~akolehma/latitude-updater.py) to use Google API Client for Python. Works for me at least.

Could you give a hint how to install the google stuff? I unpacked the tarball and did "python setup.py install" as root, but it still complains:

Code:

~ $ ./latitude-updater.py
Traceback (most recent call last):
  File "./latitude-updater.py", line 38, in <module>
    import location
ImportError: No module named location



All times are GMT. The time now is 20:23.

vBulletin® Version 3.8.8