Progressive Web Apps(PWA’s), are a type of application that is developed using web technologies and can be installed on any device like a traditional application. Creating a simple PWA is very easy as it involves adding two important files to the project which are manifest.json and serviceworker.js. After that, the PWA would be ready to be installed on any Operating System.
Follow Making a simple PWA under 5 minutes tutorial to build a PWA (or) follow the steps given below to create a PWA.
Step 1: Create a manifest.json file in the same directory where index.html file is placed. This file contains the app name, start URL, theme color and some more basic information about the app in JSON format
Step 3: Link serviceworker.js to index.html using <script> tag in index.html.
Finally, you have made a PWA. PWA’s can help you to make your website into an app in your user’s smartphone. Some examples of Google Map Go, Twitter lite, and Instagram Lite. If you look at PWA’s clearly, they are not using traditional APK files for installation. So these PWA can be submitted to the play store, but we can install all the above examples from the play store. This made possible by Google using a technology called Trusted Web Activity(TWA).
Google says “A Trusted Web Activity lets your Android App launch a full-screen Browser Tab without any browser UI. This capability is restricted to websites that you own, and you prove this by setting up Digital Asset Links. Digital Asset Links consist essentially of a file on your website that points to your app and some metadata in your app that points to your website. When you launch a Trusted Web Activity, the browser will check that the Digital Asset Links check out, this is called verification. If verification fails, the browser will fall back to displaying your website as a Custom Tab.“
For this tutorial, we use the website django-blogiee.herokuapp.com. You can look into its manifest.json and serviceworker.js.
There are three ways to do this as follows:
- If you are an Android developer you can build yourself and you have no need to follow this tutorial(Hard way)
- Even you are not an Android developer but have experience with NodeJs, NPM, JDK, and android command-line tools and command-line interface you can use the Bubblewrap project.(Medium way but need a lot of downloads)
- If you are running your blog using pre-built Content Management Systems(CMS) like WordPress, Ghost, and its plugins, You can follow this tutorial. (Easy way)
Make sure your website is a fully compatible PWA. You can use the Google LightHouse tool to look like the below picture.
Now if you are Good with your PWA, go to website PWABuilder by Microsoft and place the URL of your website and click start. if you see your website score as 100, then click build my PWA. you will see something like the below picture.
Then you can download your android package which can be submitted to the play store. Even you can download packages for Apple App Store, Windows Store, and Galaxy store.
Extract the Downloaded Zip to get the APK file to add the Digital Asset file “assetlinks.json”. Make sure your assetlinks.json file can be found at URL https://<your domain>/.well-known/assetlinks.json.
- Progressive Web App - A Combination of Native and Web App
- Top 8 Tips to Get Your Android App Featured on Google Play Store
- Top 7 Google Play Store Tips That You Should Try
- Tips to Prepare Your Android App For Launch in Google Play Store
- How to Publish Your Android App on Google Play Store?
- Progressive Web Apps - Benefits, Components and How it Works?
- General Introduction to Progressive Web Apps(PWA)
- How to Add App to Home Screen : Progressive Web Apps
- Sending Push Notifications : Progressive Web Apps
- Gradle Build Tool I Modern Open Source Build Automation
- Web 1.0, Web 2.0 and Web 3.0 with their difference
- Build a Simple static file web server in Node
- Difference Between Web server and Application server
- Difference Between Web application and Website
- How to assign and read values of two different submit buttons using AngularJS ?
- Is your Web Application Secure Enough? Think Again
- 5 Must Have Tools For Web Application Penetration Testing
- How to Setup Burp Suite for Bug Bounty or Web Application Penetration Testing?
- How to choose a Technology Stack for Web Application Development ?
- HTML | DOM Input Submit formTarget Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.