On 06/07/2012 12:57 AM, Jonas Sicking wrote:
On Wed, Jun 6, 2012 at 10:52 PM, Anant Narayanan <[email protected]> wrote:
On 06/06/2012 06:54 PM, Jonas Sicking wrote:
I don't really understand what change is being proposed here. Doesn't
getInstalled already return the list of applications installed through
the store which is calling getInstalled?
In other words, what specifically is the problem with the current API?
There is no way in the current API to distinguish between apps that have
been installed and apps that have been "acquired" (not quite the same as
installed) and do not have a native launch target.
Therefore the proposal is to modify getInstalled to return a list of apps
that have launch targets on the current platform, *only* when called in a
privileged context like a dashboard. getInstalled will continue to work as
currently defined for regular origins like stores.
Isn't that what the mgmt.getAllInstalled() API returns?
Also, I believe that Fabrice is working on adding a property on the
App object which lets us tell the difference between an app which has
been "acquired" but not yet fully downloaded and given a launch
target. So getAllInstalled() could return all acquired apps and then
pages could filter out the ones that don't yet have a launch target.
What I'm working on in bug 702369 is the preloading of the offline-cache
at install time : this adds a property on the Application object that
let the page know the status of the app ("installed, "downloading",
"cached") and also fires onprogress on the app object when the status
changes (we'll have real progress support once bug 744713 will be fixed).
What Anant and others from the apps team talk about is the difference
between an app that has been installed in the DOM Registry, and one that
has a native launcher. Unfortunately they refer to the first kind as
"acquired", and only consider the "native" one installed.
It looks like the pain point here is that there are implementation
issues with knowing when a native artifact of an app is removed from the
host OS - this leads to a situation where the app is still in the DOM
Registry but not on the host OS.
The proposed solution (changing getInstalled()) is not enough to cover
all uses cases. For instance, launch() will likely not work correctly
anymore. I really think this is an implementation issue, and that the
API is correct. Also, since we are pushing for standardization of this
API, leaking implementation details will likely not help.
Fabrice
--
Fabrice Desré
b2g Team
Mozilla Corporation
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps