Start codelab

Codelab Flow

Getting started

L N Native Install Banner

After Publishing Your Native App say Android, the next thing that rings in your mind as a dev is how to get it out there to people for them to install. That matters.

With the reach and capabilities that progressive web apps have, you could rather build a progressive web app that automatically in a more engaging way prompts the user to install your native app.

Well, with PWA Fire App you will start your Progressive Web App Project and add a few lines of code to the app.webmanifest to add that Native App Install Banner on the web.
Make sure to configure your app.webmanifestfile as in the code below.

        "prefer_related_applications": true,
        "related_applications": [
            {
            "platform": "play",
            "id": "your_native_app_id"
            }
            ]
            

Code description

prefer_related_applications - Tells the browser to prompt the user with your native app instead of the web app. Leaving this value unset, or false, the browser will prompt the user to install the web app instead.

related_applications - Is an array with a list of objects that tell the browser about your preferred native application. Each object must include a platform property and an id property. Where the platform is play and the id is your Play Store app ID.

Have happy code dance 💃

What's next?

Read more about Native App Install Banners on our developer docs here and remember to share and take more Progressive Web Apps codelabs here

Support

Donate a Star and Contribute in any way. Be sure to Follow and use Project FAQ-Beta. If you use FAQ-Beta kindly let us know via info@pwafire.org | mayedwine1@gmail.com or JUST simply Tweet us

License

Licensed under an Apache License 2.0

FORK ON GITHUB