blob: b8c5a7cc16a814c1b7d8af91905a084615ee6aa2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
[[!table header="no" class="mointable" data="""
[[!toc ]]
"""]]
# GeoClue: The Geolocation Service
Geoclue is a [[D-Bus|http://dbus.freedesktop.org]] service that provides location information. The primary goal of the Geoclue project is to make creating location-aware applications as simple as possible, while the secondary goal is to ensure that no application can access location information without explicit permission from user.
Geoclue is Free Software, licensed under [[GNU GPLv2+|http://www.gnu.org/licenses/old-licenses/gpl-2.0.html]]. It is developed for Linux.
The aim of project is to utilize all possible sources of geolocation to best find user's location:
* WiFi-based geolocation (accuracy: in meters)
* GPS(A) receivers (accuracy: in centimeters)
* GPS of other devices on the local network, e.g smartphones (accuracy: in centimeters)
* 3G modems (accuracy: in kilometers, unless modem has GPS)
* GeoIP (accuracy: city-level)
WiFi-based geolocation makes use of [[Mozilla Location Service|https://wiki.mozilla.org/CloudServices/Location]]. If geoclue is unable to find you, you can easily fix that by installing and running a [[simple app|https://wiki.mozilla.org/CloudServices/Location#Contributing]] on your phone.
For making use of your phone's (currently only Android supported) GPS, you'll need to install the latest version of [[GeoclueShare app|https://github.com/ankitstarski/GeoclueShare/releases]] on your phone.
Geoclue used to also do (reverse-)geocoding but that functionality has been dropped in favor of [[geocode-glib|http://ftp.gnome.org/pub/GNOME/sources/geocode-glib/]] library.
# Discuss & contribute
* Discuss on [[mailing list|http://lists.freedesktop.org/mailman/listinfo/geoclue]]
* Chat on `#gnome-maps` on `irc.gimp.org`
* Bugs are handled in freedesktop.org Bugzilla
* [[File a bug|http://bugs.freedesktop.org/enter_bug.cgi?product=GeoClue]]
* [[see open bugs|http://bugs.freedesktop.org/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=GeoClue&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=]]
* [[Get notified|https://bugs.freedesktop.org/userprefs.cgi?tab=email]] of new Geoclue bugs (add `geoclue-bugs@freedesktop.org` to your watchlist)
# How to use it from an application
Here you can find documentation for the D-Bus API: [[http://www.freedesktop.org/software/geoclue/docs/]]
Here is an example of how a C application can locate its user: [[http://cgit.freedesktop.org/geoclue/plain/demo/where-am-i.c]]
# Get the source
The code is is available as a tar-ball and in a Git repository. You can also [[browse the source|http://cgit.freedesktop.org/geoclue]].
Latest releases available [[here|http://www.freedesktop.org/software/geoclue/releases/2.2/]].
Git repository:
* [[!format txt """
git clone git://anongit.freedesktop.org/git/geoclue
"""]]
For help with Git, see [[Usage notes|Infrastructure/git]] here on freedesktop.org and documentation on [[Git homepage|http://git.or.cz/gitwiki/GitDocumentation]].
## History
Geoclue got started during GNOME Summit 2006 in Boston. At least Keith Preston and Tuomas Kuosmanen can be blamed.
There was a total rewrite after version 0.9. Use tag "0.9" (as in `git checkout 0.9`) if you need the old code.
There was yet another rewrite that we call geoclue2. The first version to introduce the re-write was 1.99. You can find the rationale for the re-write [[here|http://www.hadess.net/2013/04/geocluing-desktop-slowly.html]] but I was way too lazy/busy to preserve the previous wiki page.
|