← Back to team overview

ubuntu-phone team mailing list archive

Re: Adjusting camera settings in a Web app

 

I'm having trouble with allowing a web app to access the phone's camera.

This is something that is working fine in the default web browser, but
the webapp-container doesn't seem to pick up or accept the
policy_groups defined in the apparmor file [1]. `click-review`
complains about 3 policy_groups, including the "camera", even though
the documentation [2] mentions them as legitimate:

   $ click build .
   [...]
   Now executing: click-review ./appear-in.peter-bittner_0.2_all.click
   Errors
   ------
    - security_policy_groups_webapp (appear-in.apparmor)
   found unusual policy groups: connectivity, camera, microphone,
keep-display-on
   [...]

[1] https://github.com/bittner/appear-in/blob/master/appear-in.apparmor#L5
[2] https://developer.ubuntu.com/en/start/platform/guides/app-confinement/#Usage-1

 I've submitted the web app the the Store nonetheless, and after a
manual review [3] is has been released. Anyhow, the web app refuses to
show the access permission dialog to the user which pops up correctly
in the plain web browser on the phone.

What's wrong here? Is this a bug in the webapp-container? Or is access
to the camera only available for Qt apps?

Side note: Interestingly, access to the microphone has always been
possible, even without the "microphone" policy_group (I noticed this
in version 0.1 of my web app [4]). Not sure whether this is a bug or a
feature.

[3] https://myapps.developer.ubuntu.com/dev/click-apps/4646/rev/2/
[4] https://github.com/bittner/appear-in/blob/0.1/appear-in.apparmor

Thanks in advance for any hints,
Peter


Follow ups

References