What is Mobile Push Notification?

Mobile push notifications are the most popular type of push notification and are often referred to simply as push notifications or push, and it’s important to follow push notification best practices. They are mostly clickable pop-up messages that appear on mobile screens.

Web push notifications are a way for web apps to send notifications to a user’s device even when the user is not currently on the website. These notifications can be sent to a user’s desktop or mobile device and can be used to alert the user to new content or events on the website or to re-engage the user with the website.

Oracle APEX with PUSH!

These push notifications are well-designed by ORACLE to grab attention and can convey reminders, updates, and promotions. And they appear very elegant with industry-standard features that consist of a message title, body, icon, and link by the user tapping on notifications, then it gets redirected to an APEX app or a specific page of the app.

Apex sends a push notification to a user. All devices that the user subscribed to will receive the push notification.

Enabling this option will:

  •     Add a new navigation bar entry: User Settings
  •     Allow users to subscribe and unsubscribe to push notifications.
  •     When subscribed, users can receive push notifications from the APEX app.

This option is default enabled for any newer applications.

Now , let’s create a sample PUSH application.

Create a new application and choose the Install Progressive Web App and Push Notification methods under the features section.

Note: A couple of new pages #20000 and #20010 appear automatically for this feature.

These setting pages appear because of the Easy Subscription method that lets users allow or disallow push notifications on their device.

Easy Subscription

APEX users can subscribe to push notifications from within their applications, while instance administrators can manage a queue of notifications.

The setup of push notifications can be configured either by Process or API invoke.

A new process type “Send Push Notification” is introduced under the process configuration section and execution point of this process invoke can be of any of its type like Before header , after region or after submit .

This process type comes along with of the supporting components of a process configurations setups like Server-side Condition, Authorization Scheme, Build Option, Comments and Audit Information.

New fields to consider 👍

Under the setting tab:

To:   

Username of the application user who should receive the push notification. To receive the notification, the user must have subscribed to the application first. Username is case-sensitive.

Title : Title of the push notification.

Body: Body of the push notification.

Next, the application must be installed first before notification subscription by enabling the notification setting that appears in the top right corner.

Initially, the notification appears as Off.

Push notifications need to be enabled by each user. It works like that to respect user privacy and preferences. By explicitly enabling push notifications, users grant the application permission to send them notifications. This ensures that users have control over the information they receive and can opt out if they feel overwhelmed or uninterested.

Enable push notifications by letting the browser allow it as per the below example.

Subscription enabled.

Then, users log in and install the application to let push notifications appear on their device.

Notification Appears.

We can also send the notifications using a new apex_pwa API.

A sample script is given below

begin

    apex_pwa.send_push_notification (

    p_application_id => 112046,

    p_user_name      => 'DEMO',

    p_title          => 'My APEX APP Notification',

    p_body           => 'Testing the Push Notifications' );

end;

Technical Notes:

Windows/Brave & macOS/Brave: supported with privacy settings adjusted. iOS/Safari: with iOS 16.4 or higher — and only in installed PWAs. iPadOS/Safari: with iOS 16.4 or higher — and only in installed PWAs.

Rejoin session 👍