[w3c/manifest] beforeinstallprompt not fire with "prefer_related_applications": true (#780)

Hello,

I want to add install banner for native app to our portal. According this [doc](https://developers.google.com/web/fundamentals/app-install-banners/native)  we should be able to do this by adding to manifest.json with following parameters and meets the [criteria](https://developers.google.com/web/fundamentals/app-install-banners/native#criteria)  

`"prefer_related_applications": true,
"related_applications": [
  {
    "platform": "play",
    "id": "com.google.samples.apps.iosched"
  }
]`

Here is manifest.json that i currently have: 
`{
  "start_url": "/",
  "gcm_sender_id": "xxxxxx",
  "gcm_user_visible_only": true,
  "short_name": "App",
  "name": "App name",
  "prefer_related_applications": true,
  "related_applications": [
 {
  "platform": "play",
  "url": "https://play.google.com/store/apps/details?id=xxxxxxxxx",
  "id": "xxxxxxxxxxxx"
 }, {
  "platform": "itunes",
  "url": "https://itunes.apple.com/us/app/xxxx/idxxxx?mt=8"
 }

],
  "icons": [
 {
  "src": "launcher-icon-4x.png",
  "sizes": "192x192",
  "type": "image/png"
 },
 {
  "src": "launcher-icon-5x.png",
  "sizes": "512x512",
  "type": "image/png"
 }
  ],
  "display":"standalone",
  "background_color": "#e8eaf6",
   "theme_color": "#3f51b5"
}`

If i change "prefer_related_applications" to false, PWA works fine for me on Chrome Desktop (Version 76.0.3809.100 (Official Build) (64-bit)) and on Chrome Android (Version 74.0.3729.136). 

Once i change  "prefer_related_applications" to true,  i see that "beforeinstallprompt" event fired for  Chrome Desktop but nothing fired on  Chrome Android. 

Does this expected behavior? Do you have some examples  of code for native app prompt? 
Thanks for you time

-- 
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/780

Received on Tuesday, 20 August 2019 10:21:04 UTC