Progressive Web Applications (PWAs) have redefined how users interact with web platforms by offering app-like experiences directly from the browser. One of the key features that elevates user engagement in PWAs is push notifications which is a powerful tool for delivering timely updates and personalized messages even when the application is not actively in use.
In this blog, we explore how to implement push notifications in Oracle APEX for PWA-enabled applications. Whether you’re building customer-facing solutions or internal business apps, integrating push notifications can significantly enhance communication and user experience. We’ll walk through the technical steps, prerequisites, and best practices to get you started with real-time notifications in your APEX PWA projects.
What is PWA?
Progressive Web Apps (PWAs) are web applications that utilize modern web technologies to deliver an app-like experience to users. PWAs are installable, work offline, and have other features that enhance user experience, such as push notifications.
What is a Push Notification?
Push notifications are messages sent to users even when the app is not open or active. These notifications help increase user engagement and provide timely updates.
Let’s create a PWA and setup Push Notifications:
Step 1: On APEX page designer, click on create and select New Application.
Step 2: Navigate to Share Component à Progressive Web App of the New Application.
Step 3: Switch On the Toggle beside Installable and Enable Push Notification.
Step 4: Click on Generate Credentials and Add Settings Page, then click on Apply Changes.
How to send a Push Notification?
Step 1: Create a page process to send the notification. I am going to send this notification to a user called [email protected].
Step 2: Create a Button to submit the page and call the process we just created
Step 3: The application is ready to send notifications. We only need to install it on the phone. To do so, open the application on your preferred browser and click on the Install app link in the navigation bar after logging in.
How to Install the PWA in Preferred Device?
Step 1: In the front-end click on Install App to install the PWA locally on to your device.
Step 2: The Application will be installed locally in your device.
Step 3: A settings page will be created by default under the Navigation Bar Drop Down.
Step 4: From the settings page, you need to check the Push Notification from your desired device and then click on allow.
Push notifications must be explicitly enabled by each user to ensure their privacy and uphold user preferences. This opt-in model empowers users to control the type and frequency of information they receive. By granting permission, users consciously choose to stay informed, while also retaining the flexibility to opt out at any time if the notifications become overwhelming or irrelevant.
Getting Notifications on Preferred Device
The Notification on your Mobile device will appear as shown in the image below.
On clicking on the Notification, it redirects to the login page.
After logging in, the user will be redirected to the appropriate page.
Sending Notifications via API
In your Notification procedure, you can customize your notification and send it using the APEX_PWA API.
Conclusion
Push notifications are a powerful tool to enhance user engagement in Progressive Web Applications built with Oracle APEX. By enabling timely, personalized updates, they help keep users informed even when they’re not actively using the application. While implementation requires careful setup and user consent, the result is a more dynamic and interactive experience. With the right approach, push notifications can significantly improve communication, boost user retention, and add real-time value to your APEX applications.