On Sunday, May 13, 2012 at 5:47 PM, Anant Narayanan wrote:

> > > getInstalled
> > > Retrives application records for all applications that have been 
> > > installed so far. This call is available to privileged callers only.
> > 
> > 
> > 
> > What's a privileged caller? Also, if this is a getter, then it should be an 
> > attribute. Only use getXXX() for async getters.
> 
> A privileged caller is an origin which has been authorized by the user
> to manage applications on their behalf. Privileged callers have the
> capability to enumerate all apps the user has installed, launch them,
> and uninstall them.

Ok, this was not really clear in the spec.  

> The goal is to provide a uniform interface for app dashboards across
> run-times, and to let people write their own, instead of locking
> everyone to a UA specific app management interface.
> 
> This is an asynchronous getter:
> 
> let op = navigator.apps.mgmt.getInstalled();
> op.onsuccess = function() { console.log(JSON.stringify(op.result)); }
> 
> > > getSelf
> > > Retrieves the application record for the origin from which the call is 
> > > made.
> > 
> > 
> > 
> > As above. This should just be an attribute called "self". Still not sure 
> > what this is though? or what it is used for?
> 
> This is also an asynchronous call, and will be used by apps to retrieve
> their own AppObject. This is useful when an app wants to retrieve the
> receipt for their app (that was set by the app store when install() was
> called), and verify, for example, that the current user has paid for
> their app.

I'm still not sure why these are asynchronous? Is what apps are installed 
retrieved from a remote server or something? If you are just checking a small 
list of installed things on the user's device, then I don't see why you would 
not just have an "installed" attribute? 
Like: 

myApps =  navigator.apps.installed; 

Otherwise, it seems like a lot of work just to get a list of things that are 
already installed on my system? 

-- 
Marcos Caceres




Reply via email to