The PWA we're starting to maintain doesn't seem to fire its beforeinstallprompt event at all when opened on mobile. It works on desktop , even in 'mobile mode' and it works in Safari/iOS (at least as far as they support it).
Everything seems fine, Lighthouse says it's fine. The only moment it doesn't work is through a browser on an Android device (both A11 and A12).
I could share a whole bunch of code, but since it works everywhere except for on mobile should be a hint enough if anyone has encountered this before.
If really necessary I could spoof something similar but I honestly feel like it won't help. The code is fine.
We are missing a masked icon so will be trying to add that, but shouldn't really stop install?
It's literally just the beforeinstallprompt event not firing on mobile Android devices.
Anyone have any idea what this might relate to?
We can skip the standard steps and things to keep in mind, checked all of it multiple times and works on anything but mobile Android. Does work on an emulated mobile screen in desktop browser.
I'm starting to feel it's a bug on browser's side, but it doesn't work for Samsung Internet either.
I'm stumped. :)
Tried going through the process multiple times. Checked manifest and service worker. Tried debugging through Chrome's dev tools, but nothing seems out of place. The listener is installed properly as well.
For anyone stumbling into this:
Our issue was with how we loaded the manifest. We have an api call to receive dynamic manifests, but were blobbing this manifest to memory. Android then started whining the url schema isn't valid.
So, no blob: or data: in your manifest URL scheme!!