6
edits
(Modification on Gallery) |
(Added FM Radio section) |
||
| Line 174: | Line 174: | ||
An example of the possible temporary hosted app following this approach is available at: | An example of the possible temporary hosted app following this approach is available at: | ||
https://github.com/telefonicaid/gaia/tree/hosted-web/apps/gallery | https://github.com/telefonicaid/gaia/tree/hosted-web/apps/gallery | ||
=== FM Radio Application === | |||
Radio app is declaring the following permissions in its Manifest: | |||
*"fmradio" | |||
**OK, this permission allows hosted content without any special prompt. | |||
**It's used for accessing the radio interface, turning it on/off and tune stations. | |||
*"audio-channel-content" | |||
**OK, This permission allows hosted content without any special prompt. | |||
**It’s used for playing sound on the app | |||
*"speaker-control" | |||
**NOT OK for HOSTED: only available to PRIVILEGED apps. | |||
**OK for TRUSTED, as permissions access is the same as for PRIVILEGED. | |||
**Allows the app to use the device speaker for playing sound. | |||
*"themeable" | |||
**NOT OK for HOSTED, only available to CERTIFIED apps. | |||
*"settings - readonly" | |||
**NOT OK for HOSTED, only available to CERTIFIED apps. | |||
**Required for: | |||
*** 1. checking changes in AirplaneMode (antenna is disabled when device is on airplane mode) | |||
*** 2. receive a notification on attention screen showing (when receiving a call) to stop the radio playing without any delay. | |||
==== How can make Video a hosted app? ==== | |||
Lets focus on the APIs not open to hosted content yet: | |||
*Speaker-Control: though it is ok for using in Trusted apps, it might be possible to open the permission for all the hosted apps too, showing a prompt warning the user about the use of the speaker. At first sight, it doesn't seem like a security risk, but more as an annoyance to the user if used maliciously. | |||
*Themeable: Does not seem like a essential feature for the application functionality so this can be disabled without impacting end-user in the short term. | |||
**In the longer term, it does not seem like a dangerous feature to be used by hosted app that want to use the device theme. | |||
*Settings: | |||
**For the airplane mode: currently there's no way to avoid the settings check, so we use a hack in the builds for allowing access for Trusted apps to the permission. We did, instead, a change on the granularity of settings request, giving access only to the specific flag needed, and not to the whole settings object [settings:airplaneMode.enabled] | |||
**Attention Screen: we used a different approach for this hack [https://bugzilla.mozilla.org/show_bug.cgi?id=1135614], but it seems that the solution for this will be in the new AudioChannels competing policy [https://bugzilla.mozilla.org/show_bug.cgi?id=961967] | |||
In conclusion: | |||
*Think about how the themeable capability could be used by any app willing to be “themed”. | |||
**For this experiment, we decided to disable this feature, as it does not have an impact for the user at the moment. | |||
*There is just one APIs that is not exposed to hosted content and that could reduce the functionality of the FM Radio Hosted App: Settings. | |||
**Stopping the radio as soon as the device receives an incoming call will be fixed with a new policy for AudioChannels in the near future. | |||
**To detect changes in Airplane mode, we are modifying the existing permission table for this experiment, but we should explore if there is any way to add more granularity to the permissions API, or any other way of exposing read-only settings to hosted apps. (Discussions going on in https://groups.google.com/forum/#!topic/mozilla.dev.b2g/G2opSeeUYD0) | |||
An example of the possible temporary hosted app following this approach is available at: | |||
https://github.com/telefonicaid/gaia/tree/hosted-web/apps/fm | |||
edits