On 06/18/2012 06:33 PM, Fabrice Desré wrote:
- For a non privileged page:
   - getInstalled() returns apps from this origin that are natively
installed.
   - getAll() fails.
   - getSelf() return the app only if it is "natively" installed???

Yes, getSelf will only return if natively installed since checking for receipts etc. is meaningless unless the user has a way to launch the app.

- For a privileged page:
   - getInstalled() returns apps from any origin that are natively installed.
   - getAll() returns apps from any origin that are in the DOM registry.
   - getSelf() returns the app if it is installed in the DOM registry???

getSelf for privileged pages behaves exactly the same as non-privileged page. This case is rare though, sometimes a dashboard may also be an app, but mostly privileged domains will get a null in the callback when getSelf is called.

On b2g, I guess we should consider all apps in the DOM registry as
"natively installed". Doesn't this mean that getAll() is useless, since
a dashboard will ask for privileges and thus can just use getInstalled()
to get all the apps?

That's right, which is why I mentioned in my earlier email than on B2G getInstalled and getAll will return the same set of apps. I think this behavior is fine.

I'd still like to get an explanation on why we do have to manage a
situation where the DOM registry and the natively installed apps are not
the same list.

When I'm on my mobile phone, I may not want all of my apps natively installed, but I'd still like to know that I own/purchased/acquired a particular app.

-Anant
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps

Reply via email to