ubuntu-location-service  ..
An aggregating location service providing positioning and geocoding capabilities to applications.
/build/location-service-EVtVAw/location-service-3.0.0+16.04.20160405/doc/daemon_and_cli.md
Go to the documentation of this file.
1 # Service Daemon and CLI
2 
3 The location service offers a daemon executable and a corresponding
4 command-line interface for interacting with it. The daemon does not
5 necessarily require root privileges, but might so depending on your
6 configuration.
7 
8 Run the following command to receive an overview of the arguments to
9 the daemon:
10 
11  ubuntu-location-serviced --help
12 
13 An example invocation of the daemon, configuring a GPS provider that
14 relies on the Android HAL to talk to the chipset, exposing the service
15 on the system DBus instance:
16 
17  ubuntu-location-serviced --bus system --provider gps::Provider
18 
19 The cli allows for querying properties of a running service instance, e.g.:
20 
21  ubuntu-location-serviced-cli --bus system --get --property is_online
22 
23 ## Configuring an Out-Of-Process Provider
24 
25 If you want to run a provider out of process, the daemon executable
26 allows you to do so by instantiating a so-called remote provider. The
27 following invocation of the service tries to connect to the provider
28 instance described by the given unique DBus name and path.
29 
30  ubuntu-location-serviced \
31  --bus system \
32  --provider remote::Provider \
33  --remote::Provider::bus=system \
34  --remote::Provider::name=com.ubuntu.location.provider.Gps \
35  --remote::Provider::path=/
36 
37 Please note that the service allows for decorating provider names to
38 uniquely identify per provider configuration options and to allow for
39 loading more than one provider of a certain kind. The following
40 configuration configures two remote providers, one relying on GPS
41 (decorated with @gps) and another one relying on network-based
42 positioning (decorated with @network):
43 
44  ubuntu-location-serviced \
45  --bus system \
46  --provider remote::Provider@gps \
47  --remote::Provider@gps::bus=system \
48  --remote::Provider@gps::name=com.ubuntu.location.provider.Gps \
49  --remote::Provider@gps::path=/ \
50  --provider remote::Provider@network \
51  --remote::Provider@network::bus=system \
52  --remote::Provider@network::name=com.ubuntu.location.provider.Network \
53  --remote::Provider@network::path=/
54 
55