47.4 SEND_PUSH_NOTIFICATION Procedure
This procedure sends a push notification to a user. All devices that the user subscribes on receive the push notification.
Syntax
APEX_PWA.SEND_PUSH_NOTIFICATION (
p_application_id IN NUMBER DEFAULT [current application id],
p_user_name IN VARCHAR2,
p_title IN VARCHAR2,
p_body IN VARCHAR2 DEFAULT NULL,
p_icon_url IN VARCHAR2 DEFAULT NULL,
p_target_url IN VARCHAR2 DEFAULT NULL )
Parameters
Parameter | Description |
---|---|
p_application_id |
ID of the application that contains the user to send the push notification to. Defaults to current application. |
p_user_name |
Username of the user receiving the push notification. |
p_title |
Title of the push notification. |
p_body |
Body of the push notification. |
p_icon_url |
URL of the icon that displays on the push notification. Defaults to the provided application icon. |
p_target_url |
URL of the page that opens when the user clicks on the push notification. Defaults to the home page of the application. Oracle recommends enabling deep linking or rejoin session on the application for best performance. |
Example
The following example sends a push notification to user "SMITH" in application 100.
BEGIN
apex_pwa.send_push_notification (
p_application_id => 100,
p_user_name => 'SMITH',
p_title => 'Your order has been shipped',
p_body => 'Order #123456 will arrive within 3 days.' );
END;
Parent topic: APEX_PWA