I am new in add-on development. I have created an add on that shows our current location. On Desktop (Windows), it works well, however on Firefox for Android, I always get permission denied. Is this happening because the page is not hosted on a server? Is there anything we need to be aware of?
On desktop, there is a popup requesting for permission and that’s it, however on android, there is no popup requesting for permission.
Thanks.
Lyes
What API did you used?
Check the MDN if it’s available on Android.
As a last resort, you can debug it:
Hi, two things from MDN that may be relevant. The Geolocation docs say the feature is only available in secure contexts (HTTPS). So if your page is opened from a local file or plain http, that could be the cause. I don’t know how Firefox for Android treats a local file, so I can’t say for sure. Also, the docs say a WebExtension that uses Geolocation must add the “geolocation” permission to its manifest. Check whether it is there, and tell us whether you run this as a normal web page or as the add-on itself.