Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PWA notification does not navigate to the target page when clicked

Eslam_ElbyalyMay 3 2024 — edited May 3 2024

Hello all,

I am using APEX 23.2.

I have a dialog page with a process that fires on “processing” point - when I submit the page. The process calls apex_pwa.send_push_notifications API. It works fine except for the target URL part. The notification should take the user to a specifc normal page in the app.

Here's the code I am using in the process…

APEX_PWA.SEND_PUSH_NOTIFICATION (
    p_user_name      => some_username,
    p_title          => 'msg title',
    p_body           => 'msg body',
    p_target_url     => apex_page.get_url(p_page => 4);

When user clicks the notification, nothing happens. Just the notification is gone now.

I tried to find out what apex_page.get_url(p_page => 4) returns. So, I created an item and set it as it's source.

It returned the following strange URL…

javascript:apex.theme42.dialog.close(true,atob('L29yZHMvci9hbGhhaXRoYW0vaGVyYWZ5LyVEOCVBNyVEOCVBOCVEOCVBRCVEOCVBQi0lRDglQjklRDklODYtJUQ5JTg1JUQ5JTg2JUQ4JUFBJUQ4JUFDP3Nlc3Npb249NTAwMDk3NTE0NjQ0OQ=='))

When I tried apex_page.get_Url…. in a normal page, it returned a normal URL started wtih ords/… .

My question is,

  • How to get the right URL in my case and enable user to navigate to it when notification is clicked?
  • Do I need apex_page.get_url API or can I just use a string URL E.g. 'f?p=&APP_ID:4:&APP_SESSION:…..?
This post has been answered by fac586 on May 9 2024
Jump to Answer
Comments
Post Details
Added on May 3 2024
8 comments
652 views