Support geolocation permission on Android
Categories
(GeckoView :: Extensions, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: mixedpuppy, Unassigned)
References
Details
(Whiteboard: triaged)
Updated•9 years ago
|
Updated•9 years ago
|
Reporter | ||
Comment 2•8 years ago
|
||
Reporter | ||
Comment 4•8 years ago
|
||
Comment 5•8 years ago
|
||
Comment 6•8 years ago
|
||
Comment 7•8 years ago
|
||
Updated•8 years ago
|
Updated•7 years ago
|
Comment 9•6 years ago
|
||
Clearing old needinfo (too late to get a stack trace from the original issue being investigated on Fennec)
Comment 10•6 years ago
|
||
Hey Agi,
it may be worth to double-check if this issue is still relevant for the extensions running on GeckoView,
this is currently marked as P3 and it shouldn't be something used by the initial set of extensions that are going to be installable on Fenix, and so there is no need to rush (but I wanted to be sure to put it on your radar).
The test Shane is referring too in commen 0 is the toolkit-level mochitest named toolkit/components/extensions/test/mochitest/test_ext_geolocation.html, which is currently still skipped on android builds.
Updated•5 years ago
|
Comment 11•5 years ago
|
||
I think the original problem for this is gone, but now we have another problem, the GeckoView code is trying to route the message through a GeckoSession, but we don't have one for the extension. https://searchfox.org/mozilla-central/source/mobile/android/components/geckoview/GeckoViewPermission.jsm#250-252 We need to add a permission delegate on the WebExtension object to handle this.
Comment 12•5 years ago
|
||
Moving to GeckoView:Extensions since this needs some GV API work.
Comment 13•5 years ago
|
||
Do we really need to route the call to the Java part? The JS side has all information available to make a decision.
Comment 14•5 years ago
|
||
How? Don't we need to prompt the user for the geolocation permission? Also the Android app needs to get the system-level geolocation permission too if it hasn't gotten it yet.
Comment 15•5 years ago
|
||
When the extension has declared the "geolocation" permission, then it can use the geolocation API without prompting the user.
Comment 16•5 years ago
|
||
Gotcha. We still need to request the android geolocation permission though.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•3 years ago
|
Comment 17•2 years ago
|
||
As I mentioned in Bug 1845911 comment 0, this issue is similar to the issue with the expected mapping between the "unlimitedStorage" extension permission (granted to the extensions through their manifest.json file) and the "persistent-storage" webAPI permission.
Bug 1845911 has a patch attached with a small set of proposed changes to make GeckoView taking that expected mapping into account when the "persistent-storage" WebAPI permission is being requested from an extension page but (unlike "persistent-storage") "geolocation" does also require the embedder app to request the android geolocation permission (as Agi mentioned in comment 16) and so in addition to the proposed changes attached to Bug 1845911, doing the same for geolocation will also require a few more changes (e.g. requesting the android geolocation permission at install time for extensions requesting it as a non-optional permission in their manifest, or at runtime along with handling a call to the browser.permission.request WebExtensions API method).
The test coverage for the expected behavior is covered by test_ext_geolocation.html (which is currently disabled on Android builds, and re-enabling it is part of what this bug is tracking).
Description
•