On 16 Feb 2015, at 10:07 pm, Marcos Caceres <[email protected]> wrote:
> > > > On February 16, 2015 at 3:51:34 PM, Paul Theriault ([email protected]) > wrote: >> On Thu, Feb 12, 2015 at 8:58 PM, Benjamin Francis wrote: >>> I would suggest we should aim to migrate the vast majority of apps >>> (including Gaia apps) to being web apps, but there are likely to be some >>> Firefox Apps which are basically Firefox OS chrome (like the system app) or >>> Firefox OS addons (like the dialer) and require chrome level type >>> privileges. >>> >> >> I did some analysis of the permissions used in Gaia to see how feasible >> this is. See[1] for data. >> >> This confirms some of the high priority APIs that we might want to expose: >> - deviceStorage:* > > Maybe the Quota Management API? I've not evaluated it, but worth having a > look: > https://dvcs.w3.org/hg/quota/raw-file/tip/Overview.html > >> - contacts > > There have been various attempts to do contacts - but they got caught up on > the whole web intents thing. I think we should redo contacts, and do it > right. In particular, something that allows something as simple as: > > <input type="contact"> > > Alternatively, we could be smarter about, for instance, <input type="tel"> or > the like, and allow the user to select values from their contacts. There may > be other reusable things in HTML. So we already have a contact pick web activity which solves the use case that <input type="contact”> would solve. Thats not really the issue here. What deviceStorage & contacts use cases all come back to is some kind of global store which multiple apps can talk to. I was going to suggest adding web concepts to these APIs - e.g. make them respect same-origin, i.e. an web page storing/reading photos can only see its own photos. But it occurred to me that this use case is already solved via indexeddb. The missing part is allowing sharing these resources between origins. Datastore was one solution I am aware of. But Im also aware there was reluctance to expose to the web. I don’t recall exactly but I think Ehsan made some comments about exposing something XHR-like mechanism for apps to retrieve resources cross-origin. I was going to bring this up on the web api list after I get through digging for the old discussion on this. > >> - SystemXHR (hard to imagine this being exposed to the web) > > CORS enables SystemXHR-like capabilities on the Web. That's already a solved > problem. If its solved, then when why do so many Gaia apps request this permission? (I suspect the answer is that writing an app like an RSS reader requires systemXHR because the endpoints are CORS enabled but we should investigate). For example, I believe the calendar app uses SystemXHR to retrieve calendar information via caldav over XHR? Same sort of questions will come up for tcp-socket & udp-socket, which are basically the same thing. (unrestricted network access I mean) > >> - Camera: expose Camera API? Or add features to getUserMedia (latter seems >> more likely, but are their hardware risks/limitations) > > Agree. How is basic support for things like?: > <input type="file" accept="image/*;capture=camera"> > > I see it's not supported on Firefox Desktop, for instance. Is it supported on > mobile or FxOS? > > I'm told that WebRTC now allows for high-quality media. I’m talking about device specific features like focus control, flash and other device specifics. I’m not clear on the details and I wonder if there are fingerprinting risks here or potentially other risks (e.g. exploiting bugs in camera drivers?) > >> - Mobile Connection API is another popular one, but this is very dangerous. > > Have you taken a look at: > http://w3c.github.io/netinfo/ I’m familiar with this API but its very different to mobile connection (https://developer.mozilla.org/en-US/docs/Web/API/MozMobileConnection) > > What's dangerous about it? Amongst other things: - allows sending MMI messages (commonly used for recharging pre-paid devices, subscribing to services, checking balance information, factory reset messages etc) - retrieve the carrier and country codes related to the sim card - choose which mobile network you want to use > >> Maybe we could look at exposing more of the read-only attributes through >> the mobile-network permission but it has similar privacy implications to >> geolocation, only more difficult to explain to the user. > > Then we can move to only enabling them through TLS, for instance. What use > case are we trying to address exactly? Are any of the use cases not covered > here: > > http://w3c-webmob.github.io/netinfo-usecases/ So they are separate use cases really. There is some read only information in MobileConnection that could possibly be more to something more like netinfo, but its a lot more sensitive that what netinfo currently exposes. I’m not convinced its a priority use case though. At least not as much as the other ones above in this email. I only mentioned it since a lot of apps use it and I was curious what they use cases where. I’ll do some digging for use cases in Gaia for all these APIs and then maybe start some separate threads to dive more specifically into these APIs. _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
