Create a GeoClue2 "Agent" [$100]

Bug #1606052 reported by Daniel Fore on 2016-07-24
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
elementary OS
Fix Committed
Medium
David Hewitt

Bug Description

Apps should have to present a request to the user before being allowed to access location data. Luckily, GeoClue2 already implements this as part of the library, we just need to implement the UI for (aka the Agent).

See the API documentation here: https://www.freedesktop.org/software/geoclue/docs/gdbus-org.freedesktop.GeoClue2.Agent.html

A design for this needs to be:

* A dialog
* With actions that indicate granting permission or denying permission
* With the default action (keyboard focus) of Deny
* Presenting the application name (and maybe icon) asking for permission
* Presenting the service we're asking permissions for (location)
* Presenting the accuracy level of information requested (country, city, neighborhood, street, exact)

Daniel Fore (danrabbit) on 2016-07-24
Changed in elementaryos:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → loki+1-beta1
Daniel Fore (danrabbit) wrote :
summary: - Create a GeoClue2 "Agent"
+ Create a GeoClue2 "Agent" [$100]
tags: added: bounty
Daniel Fore (danrabbit) wrote :

Some prior art...

**Android says:**

Allow Foo to Access This Device's Location

"Deny"
"Allow"

**iOS says:**

"Foo" Would Like to Use Your Current Location

"Don't Allow"
"OK"

---

I think I personally like the way Android words it more for the following reasons:

* The language is more accurate. You're granting permission to use the location of this device, not of yourself. I think this is important because it means we're not granting access for every device the user owns. This may not mean much now, but in a world where you theoretically have many devices running elementary OS or tied to an elementary cloud account you might want some clarity that you're only granting access per device.

* It doesn't use the word "You". Always a chance for translation error with "You".

* OK is not Okay. Explicit "Allow" and "Deny" makes things more clear.

description: updated
Daniel Fore (danrabbit) wrote :

Something to consider is that the API allows us to return a different permission level than what the app asked us for. Example: App asks for exact and we only return Country.

I'm inclined to say that we should not exercise this part of the API because it could make the app behave in a way that is broken to the user. For example an app like Maps needs your exact location to accurately route directions. It can't be effective if you don't give it accurate data. I think we trust app developers to do The Right Thing and only ask for the permission level that they actually need. Hopefully developers recognize that users will be more inclined to grant permissions that are less accurate.

I do think we should present that info in the secondary text so that the user knows what is being requested and won't be inclined to deny a reasonable request.

Changed in elementaryos:
assignee: nobody → Adam Bieńkowski (donadigo)
Changed in elementaryos:
assignee: Adam Bieńkowski (donadigo) → nobody
koko-ng (kokong) wrote :

Almost finished, just need to make remember button works, clean code and buildprocess.

Changed in elementaryos:
assignee: nobody → Tibor V. (tibv)
koko-ng (kokong) wrote :

Preview of the UI, feedback are welcome. Everything is working fine expect the "remember" button as mentioned earlier.

koko-ng (kokong) wrote :

Here is the agent: https://github.com/koko-ng/geoclue2-agent. automake, autoconf, ./configure make and make install should be ok to get it installed. You need at least to reconnect yourself to get it running. For any further info just contact me ;).

Daniel Fore (danrabbit) wrote :

Hey Tibor, I appreciate your work on this, but to be a default app for elementary OS, we have to follow some conventions. In particular:

* Our apps are all written in Vala
* We use CMake as the build system
* We host our projects on Launchpad

Unfortunately we won't be able to ship an app that doesn't follow these conventions. I would suggest starting a launchpad project first so that we can follow up there regarding any issues and to start package builds etc.

koko-ng (kokong) wrote :

Hey,
I should had informed myself before starting to code… I have almost finished transcripting it to Vala, unfortunately I won't be able to code before next weekend. I'll ping you when everything is up.

koko-ng (kokong) wrote :

It's, finally, here: https://code.launchpad.net/~tibv/geoclue-agent-vala/+git/geoclue-agent-vala. All the informations are on the project page.
Hope to see you there ;)

Changed in elementaryos:
status: Confirmed → In Progress
Daniel Fore (danrabbit) on 2017-02-23
Changed in elementaryos:
assignee: Tibor V. (tibv) → David Hewitt (davidmhewitt)
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers