42.5 SUBSCRIBE_PUSH_NOTIFICATIONS Procedure

This procedure subscribes a user to an application to enable receiving push notifications from the application.

Syntax

APEX_PWA.SUBSCRIBE_PUSH_NOTIFICATIONS (
    p_application_id         IN NUMBER   DEFAULT [current application id],
    p_user_name              IN VARCHAR2 DEFAULT [current user],
    p_subscription_interface IN VARCHAR2 )

Parameters

Parameter Description
p_application_id ID of the application that has the push subscription.
p_user_name Username of the user that has the push subscription.
p_subscription_interface Subscription object (JSON) generated from a browser.

Example

The following example subscribes a user to push notifications. This is usually used in conjunction with APEX JavaScript API apex.pwa.subscribePushNotifications and apex.pwa.getPushSubscription that can generate the subscription object.

BEGIN
    apex_pwa.subscribe_push_notifications (
        p_subscription_interface => '{ "endpoint": "", "expirationTime": null,
                                    "keys": { "p256dh": "", "auth": "" } }' );
END;