I'm lost. I am totally lost. If I install Geode on Firefox 3.0.X for Mac OS X, the Loki lib living inside Geode sees me at:
L:48.892869254791094,2.0722393526079723
Wonderful. That's very accurate.
Now, let me extract Loki.xpt and loki.dylib from the Geode XPI, and make a very small xulrunner app based on xulrunner 1.9.0.6, so similar to my Firefox 3.0.6 for Mac. Let it ping loki and get the same geolocation. Again, same XPT, same dylib. Result:
L:48,2
Hum to say the least... If you have Firefox 3.0.x (warning, it will crash with FF3.1) installed on your mac, here are steps to reproduce:
- download http://glazman.org/tmp/testGeoloc.tar
- untar it wherever you want, it creates a xulapp directory
- go into that directory
- make sure to disable Geode in Firefox is you have it installed
- call
/Applications/Firefox.app/Contents/MacOS/firefox-bin -app `pwd`/application.ini
- that will show a small window with a button inside, click that button
- first alert should show you a JS object
- second alert should show your longitude and latitude if it's possible to determine your location based on your wifi context ; integers are VERY unlikely here so if you see integers, that's the bug...
Does anyone understand this ? Why am I getting double floats in FF 3.0.6 and integers with the SAME xpt and libs outside of FF 3.0.6 ? There's no useragent detection in the lib, it does not check the caller to verify it's firefox, xpt_dump will show you the xpt is ok, and Skyhook guys are helpless here.
The Skyhook SDK gives same result ; it contains a c++ example linked to wpsapi.dylib. That example, if built by myself gives perfectly accurate results. If I use the dylib in a Firefox extension or xulrunner app, bang, I get integers too...
I'm lost. Any clue highly welcome....