I was thinking about making a “share location” app (maybe without drawing an actual map, so that people can find each other when they’re close by), but it turned out that the Geolocation API is not accessible, at least on Delta Chat for Android and Desktop.
I think given the nature of webxdc (no way to “phone home”) people are much more willing to give the app access to such API compared to regular websites, it would be a shame for webxdc to miss out on such powerful features.
Yes, it appears that on mobile the entire Delta Chat app would need to be granted such permissions in order to grant them to a webxdc app. Here’s a Stack Overflow question about it.
Also it appears that on Desktop the apps are not in a secure context Update: no longer the case after this MR. Certain APIs (e.g. Geolocation, Device Orientation, Web Crypto API) are not accessible in non-secure contexts.
Also the fact that we’ve recently started to wrap the apps in <iframes> might be a concern, but not sure.
I have a concrete proposal on how we can move forward with this in DC Desktop.
Let’s introduce an experimental toggle “Manage webxdc App Permissions”. When enabled, we add a “Pemissions” submenu to the “Edit” menu of the webxdc window that is going to list the permissions as checkboxes, similar to the “Float on Top” checkbox.
No need to think about popups and dynamic permission requests like on Android. Just simple checkboxes.
Good idea, though should be set for each webxdc instance and a confirmation dialog allowing the app to ask for permission still makes sense usability wise.