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 - iOS & Notifications

Scott WesleyApr 4 2019

G'day all,

I've followed @"vincentmorneau" comprehensive guide to setting up PWA's, with the intent of utilising push notifications on iOS devices.

https://vmorneau.me/apex-pwa-part7/

I'm at the point where there are no errors in the console, and I see these buttons on Android devices.

pastedImage_4.png

However, I do not see them on iOS. If I remove the pwa-install-btn class on 'Install this app', it's visible, but does nothing, and appears to raise no errors.

I'm also curious about the section regarding Setting up the REST Endpoint.

Does this need to use a node service, or can we define a web service in ORDS to communicate our notifications? It seems like we should be able to transform this code to do so, if it's just pushing data via REST, right? Though I'm not sure I've completely comprehended the data mechanics.

Finally, I'd like to clarify the notification capability, in part because I'm not there yet with testing, due to the question above.

Here is the sample PL/SQL code to make_rest_request()

declare

l_rest_return clob;

begin

l_rest_return := apex_web_service.make_rest_request(

p\_url => '[https://localhost:3050/push](https://localhost:3050/push)' -- My custom REST endpoint (1)

, p\_http\_method => 'GET'

, p\_parm\_name => apex\_util.string\_to\_table('title:body') -- Notification structure (2)

, p\_parm\_value => apex\_util.string\_to\_table('Hey you:is there anybody out there?') -- Notification Content (3)

);

end;

Does this sample code send a message to all users of the PWA?

While exploring how to use just web services, there appears to be a Registration ID that identifies the user you want to send a notification to.

pwa.ui seems to check that subscription, but I'm not sure how to target specific users?

What an interesting journey this will be...

Scott

Comments
Post Details
Added on Apr 4 2019
0 comments
479 views