Allow access to camera, geolocation, other Web APIs

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.
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.

Related: Other things that don't work ("Discouraged practices") · Issue #66 · webxdc/webxdc_docs · GitHub

we can implement permission handling in desktop at least, at the moment we just deny most of them.

2 Likes