Re: [w3c/manifest] Should appinstalled / beforeinstallprompt fire on native app installation? (#514)

> So the issue for us is that we already have beforeinstallprompt firing when a native app banner is shown (despite the current draft language not permitting this), and when I implement appinstalled, I have to choose between firing the event on native app installation (despite the spec not permitting this) or not (which would be inconsistent with our implementation beforeinstallprompt). 

So, the spec doesn't consider the scenario you mention above ... it's undefined behavior. What you are describing makes sense tho. 

>  I'd prefer to keep consistency, so maybe we should add a provision that installing a related application may fire beforeinstallprompt (when the banner is shown), and that it may fire appinstalled when it becomes installed.

This worries me, because it might mean that Firefox, as a regular app, won't ever be able to support this (I would imagine this would require special privileges - but maybe not?). 

> Add a platforms member to BeforeInstallPromptEvent.

We can add it to the UserResponseObject. It would be null when userChoice is "dismissed". 

So:

```  
ev.prompt().then(obj => obj.platform);
``

Also, as you mentioned, be good to get a valid reason for it being an array. 

> 5. Add AppInstalledEvent interface and change appinstalled to be that instead of Event.
> 6. Add a platforms member to AppInstalledEvent.

I'll be honest... this is gonna be really controversial for the reasons I mentioned above :( Let me run this by a few people internally... 



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/514#issuecomment-257787131

Received on Wednesday, 2 November 2016 06:57:58 UTC