Push Notifications for Web APP’s

Hi guys, I was just wondering if Thunkable will include in the short term the Push Notifications feature for Web APP’s. It will be very useful and maybe I will start to forget publishing Mobile APPs

1 Like

Maybe use Zapeir or similar to get the same functionality.

3 Likes

Can you explain how you’d want a push notification to work in a web app? I guess I think about push notifications causing something to happen outside the app, and I’m not sure what that would look like in a web app.

3 Likes

thanks @muneer! . Im gonna check it, have you tried it?

1 Like

hi @catsarisky . Besides publishing your project as mobile APP thunkable offers to publish as Web APP but the push notification feautre is not available for Web APP.
So i would want to use this feature just like having a mobile APP, for example sending advertising, reminders, alerts, etc (it depends on how your APP works). BTW the push notificatios on Web APPs should work even when you APP is not loaded just like when mobile APP is closed.

1 Like

One Signal has a web notification option. I don’t know if you can make it play with a Thunkable web app or not, however. If you just want it to prompt the user to open the web app’s url, probably?

If you didn’t need to notify when the web app was closed, you could just do a message within the app.

1 Like

Not possible now using web notification with OneSignal and thunkable :pensive:. And of course i need to notify even when APP is closed.

1 Like

So I wonder if you could use the open link function to open a browser screen to a page (served by your webserver) that does the one signal web app permissions/sign-up. I’m assuming it won’t work in a web viewer window within the web app, although I haven’t tried it. You could send the web app’s URL in the notification.

1 Like

I get your point. But now the main issue for me is how to use push notifications having a Web APP from Thunkable.

1 Like

So what would your ideal process look like? Have you actually tried with web viewer, and does it fail?

1 Like

you mean web viewer inside a mobile APP?. i only want to use Web APP but currently thunkable not support push notifications.

1 Like

No, I meant within a web app, since you were very clear that’s what you wanted. Web viewer is a Thunkable component. It works for SOME websites within web app. (You meant an app created by the “Publish to Web” option, right?) For example, I use Web Viewer for my users to authenticate with my local grocery store’s website, so that I can then use the grocery store’s API to put things in the user’s cart.

You keep repeating that Thunkable doesn’t support push notifications. Thunkable does support push notifications on mobile, using One Signal. Your web browser probably also supports web push notifications (from One Signal). So I’m wondering if there’s a way to get a web app user signed up for web push notifications.

If I get some time, I’ll try to get something working in the next day or two - it sounds like an interesting challenge. If you want it to be useful to you, you might want to describe a little more fully what you want those push notifications in the web app to do.

2 Likes

Yes, I used IFTTT to send emails to my users based on some criteria. As long as you capture the email of your user, you can send email.

My IFTTT service checks the database every hour and sends email notifications for the users.

1 Like

Dear @catsarisky thanks a lot for your reply, i am sorry because of my bad english. what i am referring about thunkable does not support push notifications (only when you publish as Web APP) is to this:

1 Like

I tried getting OneSignal notifications using the Web app. I used a webpage that I could embed some javascript on. I tried the pop-up request and also the embedded link option. Both work fine when I use my browser (Chrome) to visit those pages, so I think I had them set up correctly. Then I made a Web app with an embedded Web Viewer component, pointing at the same webpage. The pop-up never happened in the web viewer. Although the OneSignal javascript loads, it doesn’t seem to rewrite the

to contain a functional link for the embedded link option. Interestingly, the Web Viewer gets a /cookie/ from OneSignal without issues. I don’t think it’s an origin problem - OneSignal throws a specific error message for that, and I didn’t get it with the Web Viewer component in a web app.

I’m out of ideas for workarounds for today. When we get an option to put web apps in iframes (which I think is coming, is that right @domhnallohanlon ?), it should be doable. (Put the OneSignal stuff OUTSIDE the iframe.)

Actually, hang on! I’m not out of ideas. Here’s a “works today” option. Put the One Signal opt-in on a webpage. In the web app, make a “sign up for notifications” button that opens that webpage (use the open link). On that web page, thank the user for subscribing and tell them they can close the tab.

2 Likes

Great job @catsarisky and thanks a lot!. Just one question, did you test in a desktop or in a mobile? If you tested in a mobile you used an IOS device or Android device?. I have read currently iPhones don’t support web notifications with any browser, is that right?

Desktop. I assumed that was what you wanted to do. I think the user experience is better if you build an actual app instead of pointing phones at a web app. I get lots of layout weirdness with my iphone when I view a published web app, for instance.

2 Likes

Here’s my demo project:

https://thunkable.site/w/ABGV0yBK2

Works on web on a desktop. Does /not/ work in a web browser on an iPhone. Pushing the button should get you a new window that prompts (after ~2 seconds) for you to subscribe, then closes again (probably).

3 Likes

gonna check it, thanks a lot @catsarisky !!

Fixed now :slight_smile:

1 Like