6
edits
(Added FM Radio section) |
(Camera app added) |
||
| 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 | ||
=== Camera Application === | |||
Camera app is declaring the following permissions in its Manifest: | |||
*"themeable" | |||
**NOT OK for HOSTED, only available to CERTIFIED apps. | |||
**Needed for easily change the app theme (unused at the moment) | |||
*"device-storage:pictures" & "device-storage:videos" (read-write access) | |||
**NOT OK for HOSTED: only available to PRIVILEGED apps. | |||
**OK for TRUSTED, as permissions access is the same as for PRIVILEGED. | |||
**Used for accessing the storage to keep the created media files. | |||
*"settings - readonly" | |||
**NOT OK for HOSTED, only available to CERTIFIED apps. | |||
**Required for: | |||
***1. Check the current sound settings to play a sound when taking a photo. | |||
***2. Check the device's hardware for specific zoom options on Nexus device. | |||
***3. Check for changes on storage volume to updated the file destination. | |||
*"camera" | |||
**NOT OK for HOSTED: only available to PRIVILEGED apps. | |||
**OK for TRUSTED, as permissions access is the same as for PRIVILEGED. | |||
**Needed for access to the device's cameras. | |||
*"geolocation" | |||
**OK for HOSTED apps | |||
**Used for geotag the media captured. | |||
*"audio-channel-notification" | |||
**NOT OK for HOSTED: only available to PRIVILEGED apps. | |||
**OK for TRUSTED, as permissions access is the same as for PRIVILEGED. | |||
**Needed to show a notification on status bar when the camera is in use (e.g. video recording) | |||
*"audio-channel-content" | |||
**OK, This permission allows hosted content without any special prompt. | |||
**It’s used for playing sound on the app | |||
*"feature-detection" | |||
**NOT OK for HOSTED: only available to CERTIFIED apps. | |||
**Not used at the moment, seems like old code. | |||
==== How can we make Camera a hosted app? ==== | |||
Lets focus on the APIs not open to hosted content yet: | |||
*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: | |||
**Sound Enabled detection has been disabled for the moment, but in the future AudioChannelManager will take care of it [https://bugzilla.mozilla.org/show_bug.cgi?id=961967] | |||
**Hardware detection has been disabled for the experiment, but the hack should be getting rid of in the future, as it is device specific. | |||
**Storage change detection has been also disabled for the demo, but it needs to be handled in some way if we want to keep the app usable. | |||
*Feature Detection | |||
**It doesn't seem to be used at the moment, so removing it is a good solution. | |||
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. | |||
*Remove the "feature-detection" permission as it is no longer needed | |||
*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. | |||
**Sound detection will be handled by the AudioChannelManager on the future. | |||
**Hardware detection should be removed and the device specific hack should be fixed in a different way. | |||
**Storage changes detection is the big problem in here, with no other approach at the moment. This could be handled by opening the settings API for readonly needs, or more granularity on the permissions. (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/camera | |||
=== FM Radio Application === | === FM Radio Application === | ||
| Line 195: | Line 251: | ||
*** 2. receive a notification on attention screen showing (when receiving a call) to stop the radio playing without any delay. | *** 2. receive a notification on attention screen showing (when receiving a call) to stop the radio playing without any delay. | ||
==== How can make | ==== How can we make FM Radio a hosted app? ==== | ||
Lets focus on the APIs not open to hosted content yet: | 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. | *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. | ||
edits