History log of /haiku/src/tests/kits/net/service/GeolocationTest.cpp
Revision Date Author Comments
# 85a6d653 30-Jan-2021 Niels Sascha Reedijk <niels.reedijk@gmail.com>

libnetservices.a: fix unit test builds after hrev54923


# 9581e328bd4b1c88e60054fc6c9a1e61ef107dc2 02-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Move geolocation test to the shared kit tests.

* Fix the build.


# 84e6fa8e2a9d84a2fe7bc6c7657093c6df71ebb1 24-Sep-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Geolocation: use test key for tests.

Mozilla provide a test key (with usage restrictions) for testing
purpose. Make use of it in our unit tests.


# 13f0458896f84bcd6ea7521bb96298565eb2ef78 23-Sep-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Add BGeolocation experimental API.

A BGeolocation object can query an online service to get geolocation
and geotagging data:
* LocateSelf() tries to locate the machine it is running on, by using an
online database of wifi access points
* Locate() (not yet implemented) searches a BString and converts it to
lat/lon coordinates (reverse geotagging)
* Name() (not yet implemented) finds a suitable name for the given
coordinates (address, building name, or anything fitting).

The default service used is openbmap.org, which is freely available but
not very accurate. A request has been sent to Mozilla to use MLS
(Mozilla Location Services), which is a bit more accurate but needs an
API key. MLS is used for geolocation on FirefoxOS, for mobile phones
which don't have a GPS, and the data can be contributed by Firefox for
Android or the dedicated MozStumbler app.

Alternatively, Google Maps also provide the service, but wants
people to pay for it. Google Maps data is more accurate as all Android
devices contribute data to it.

All 3 services use the same JSON-based API: we send a list of reachable
Wifi APs (mac address and signal strength), and we get lattitude and
longitude information, and possibly extra data which will currently be
unused.

This can be used to implement HTML5 geolocation with reasonably accurate
results, but it can also be used in other places. For example
FirstBootPrompt could try to guess a list of most likely languages and
keyboard layouts from it (if wifi is working at install time, that is).