How to Build Progressive Web Application and Submit it to the Play Store?
Last Updated :
30 Aug, 2024
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
Javascript
{
"name" : "Django Blogiee" ,
"short_name" : "Django Blogiee" ,
"description" : "PWA for django Blogiee" ,
"start_url" : "/" ,
"display" : "standalone" ,
"scope" : "/" ,
"orientation" : "any" ,
"background_color" : "#ffffff" ,
"theme_color" : "#000000" ,
"status_bar" : "default" ,
"icons" : [
{
"src" : "/static/icons/Django-Blogiee.1b98d36d50a7.png" ,
"sizes" : "512x512" ,
"purpose" : "any maskable"
}
],
"dir" : "ltr" ,
"lang" : "en-US" }
|
Step 2: Create serviceworker.js, a JavaScript file in the same directory as manifest.json which handles installing and caching of the PWA app.
Javascript
var staticCacheName = "django-blogiee-v" + new Date().getTime();
var filesToCache = [
'/static/icons/Django-Blogiee.1b98d36d50a7.png' ,
];
self.addEventListener( "install" , event => {
this .skipWaiting();
event.waitUntil(
caches.open(staticCacheName)
.then(cache => {
return cache.addAll(filesToCache);
})
)
});
self.addEventListener( "fetch" , event => {
event.respondWith(
caches.match(event.request)
.then(response => {
return response || fetch(event.request);
})
. catch (() => {
return caches.match( '/offline/' );
})
)
});
});
|
Step 3: Link serviceworker.js to index.html using <script> tag in index.html.
Javascript
<script type= "application/javascript" >
if ( 'serviceWorker' in navigator) {
navigator.serviceWorker.register( '/serviceworker.js' , {
scope: '/'
}).then( function (registration) {
console.log( 'django-blogiee: ServiceWorker registration successful with scope: ' , registration.scope);
}, function (err) {
console.log( 'django-blogiee: ServiceWorker registration failed: ' , err);
});
}
</script>
|
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.

lighthouse report
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.

pwabuilder.com report
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.

Download APK package
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.
Similar Reads
How to Cache Ejs and Built the Progressive Web Application with Nodejs?
To cache EJS (Embedded JavaScript) templates and build a Progressive Web Application (PWA) with Node.js, we need to leverage several key technologies. Caching EJS templates can significantly enhance performance by reducing the need to recompile templates on each request. we'll learn how to cache EJS
4 min read
How to Add App to Home Screen : Progressive Web Apps
Web App Manifest is a simple JSON file that tells the browser about your web application and how it should behave when 'installed' on the user's mobile device or desktop. We Need to add a link of Manifest in order to add the Web App to Home Screen. Write in the HTML Head of your Code. How Manifest F
2 min read
How to Build a Progressive Web App (PWA) from Scratch?
A Progressive Web App (PWA) is a kind of application software sent through the web, formed using standard web technologies such as HTML, CSS, and JavaScript. PWAs are planned to work on any platform that uses a standards-compliant browser, containing both desktop and portable devices. Steps to Build
4 min read
How to build progressive web app(PWA) in Angular 9 ?
In this article, we will develop a PWA (Progressive Web App) using Angular. What is PWA ? Progressive Web Apps (PWAs) are web applications that have been designed so that they are capable, reliable, and installable. PWA are built and enhanced with modern APIs to deliver enhanced capabilities, reliab
7 min read
How to Build Single Page Applications?
SPAs really revolutionized the way we think about and build web applications that are in tune with modernity. Compared to multi-page applications, SPAs offer better performance, finer transitions, and altogether a better user experience. Whether you are totally new to SPAs or aiming to make one for
9 min read
How To Deploy React Native Application on Play Store?
One of the most important advantages of using React Native is that it can generate applications for both Android and iOS operating systems. In this article, we will discover how to deploy a React Native app to the Play Store, and how to bundle all the files of the application and generate an AAB fil
6 min read
Progressive Web App - A Combination of Native and Web App
Web is a wonderful platform. Its omnipresent across devices and operating systems, its user-centered security model, and the fact that neither its specification nor its implementation is maintained by a single company or organization make the web a unique and promising platform to develop software o
9 min read
How to develop a Progressive Web App using ReactJS ?
Progressive React Applications respond very fast to user actions. They load fast and are engaging just like a mobile app. They can access Mobile device features, leverage the Operating System, and have a very high reach. It enables Installability, Background Syncing, Caching and Offline Support, and
10 min read
How To Create and Upload Your App To Google Play Store?
Mobile application development industries play a major role in todayâs generation as many businesses are looking forward to building a mobile application for their enterprise. A developed application needs to be published on Google Play Store for the intended audience to download and use it. In orde
10 min read
Embracing the Evolution: The Rise of Progressive Web Apps (PWAs)
IntroductionIn the dynamic landscape of a virtual generation, the evolution of net applications has been now not whatever quick or excellent. From static HTML pages to dynamic internet reviews, the adventure has been marked by means of regular innovation and variant. Among the fashionable milestones
5 min read