On 06/07/2012 11:44 AM, Anant Narayanan wrote:
On 6/7/12 11:17 AM, Fabrice Desré wrote:
On 06/07/2012 11:03 AM, Anant Narayanan wrote:
1. Apps that the user has acquired, across all their devices
2. Apps that are installed on the current device (the definition of
"installed" can vary from device to device, but for Android/Desktop,
this is the native installation)
My proposal is to make getAll return (1) and getInstalled return (2) in
the case of privileged domains like the dashboard. Are there use cases
that this proposal does not fulfill?
Can you launch() an app returned by getAll() but not getInstalled() ?
Since both return the same type of app object, yes.
The behavior of launching an app that is in getAll but not in
getInstalled is left to the User-Agent (well that's a redundant
statement, since the launch operation by itself is UA specific).
I see no reason why the behavior should be different...
The key point is that this mechanism now lets us build dashboard that
may want the user to install an app before being able to launch it. Not
all dashboards may choose to enforce this, of course. A dashboard that's
running in a non-WebRT environment (like Chrome) will simply launch the
app in a new tab, for apps in both getAll and getInstalled sets.
For B2G, I think most apps will be in the getInstalled category, with
the exception of new apps that was just freshly synced over from the
cloud and have not been added to the home screen yet. One could imagine
an interface through which the user can install these apps. It is not
possible to launch an app that isn't on the home screen anyway [unless
you go the dashboard in the browser app? That's pretty recursive... :)]
The mozApps API is not a dashboard API. If you need to track which app
is waiting in a sync queue or in a cloud account, use another API for that.
You need no UI to launch an app, just do
getSelf().onsuccess(this.result.launch()) for instance.
Fabrice
--
Fabrice Desré
b2g Team
Mozilla Corporation
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps