Changes

Jump to: navigation, search

WebAPI/WebActivities/LessonsLearned

2,393 bytes added, 17:21, 16 May 2014
no edit summary
[https://docs.google.com/a/readitlater.com/document/d/1S5TnrCMrtaYqPTSK3YUIE-6shWSvRONdEhm74rW7CrE/edit Pocket recommendations].
 
== Differences between "data sources" and activities/intents ==
 
One of the things we looked at solving with WebActivities in FirefoxOS was access to "data sources". For example the list of contacts, the list of calendar events, the music library or the camera photo stream.
 
However due to various complexities we found that "data sources" tend to be different enough from other WebActivity use cases that we'll likely need significantly different primitives. Though there might be possible to tie in with WebActivities somehow.
 
When granting access to for example contacts to an app, you likely want that app to have access to *all* your contacts, not just the contacts from a specific other app. So you'd want to grant access to your gmail contacts, your facebook friends, your outlook address book and any "built in" contact address book.
 
Getting contacts from many apps at the same time can be prohibitevly expensive if you have to launch all those apps, even if they don't need to render UI. Each app runs in a separate process and starting g multiple processes takes too much CPU and memory on mobile.
 
Displaying a merged contact list from all your contacts sources will take too long if you have to get the full contact list from each source, then merge those lists, then sort them, then reformat to get just the data you want to display in HTML form.
 
This is even more true for a photo stream where you also need to generate thumbnails.
 
It needs to be possible to do some of that work ahead of time and then react to any changes in those data sources before the user launches the app. Or at the very least you need to be able to cache the result from last time you generated the contact list, and then get a list of changes since last time a list was generated. Though for something like thumbnail generation (the size of which can be consumer-application specific) ahead-of-time is likely desired.
 
When a user grants access to a data source we need to indicate if permanent access is granted, or just a one-shot access. That indicates a somewhat different UI than we want for "share" and "pick".
 
Similarly, the UI that comes up when an application tries to access "contacts" data sources, the user needs to be able to choose multiple applications that can provide that type of data. Normally for a WebActivity the user just picks a single application to handle the activity.
Confirm
716
edits

Navigation menu