Hey guys,
As I said here Native MOBILE app - like cheap or FREE 📱 with FREE & Unlimited PUSH notifications! 📬 - #62 by mvandrei I was working on my very own OneSignal plugin for bubble.
Why I did it? Because I wanted push notifications for my own app, to have badges on iOS, and a bit more control over it.
With this plugin, you can:
- Send individual messages.
Like when you want to book an appointment and the owner of the listing will receive an email, along how many
others? Now it will be able to receive a push notification from your bubble app that can be a mobile app also
(please check the link above); - Segmented messages.
Here you can make it so you can send a promotional message, a marketing message, an important security
update or whatever you desire; to a variety of users:
A. All;
B. All that are active on the app;
C. All that are NOT active on the app;
“By default, every app has three built-in segments: All, Engaged Users, and Inactive Users.” on
OneSignal.com website. For more details please check: https://documentation.onesignal.com/v3.0/docs/segmentation - Set icon badge on iOS (increase it’s number, decrease it etc. Please check https://documentation.onesignal.com/v3.0/reference#create-notification
The URL will make your app load that page in Safari or your default browser on Android. I will find a way to be able to load it inside the app, so if you are sending your user to “http://yourapp.bubble.io/messages” it will open your “messages” page inside of it, rather than in an external browser.
Here is the same, just that you have Player id so you can send it to an individual user. I will show you in a video how you will set both options, to send to one user and to many (segmented).
To be able to get the Player ID, the unique ID assigned by OneSignal.com you need to follow these steps you’ll find here:
Native MOBILE app - like cheap or FREE 📱 with FREE & Unlimited PUSH notifications! 📬 - #8 by mvandrei
This is the code you will need to use /* wk.bridge.min.js | v0.2 */ (function(){if(window.isIOS){return}window.is - Pastebin.com for the bridge.
Now for the videos, on how to setup the plugin and test it. There is nothing wrong with your sound, my english is out of practice so I didn’t speak.
Step1. Install the plugin:
Step 2. Configure the plugin to send individual push notifications based on any action you want from your app:
Step 3. Configure the plugin to send Mass push notifications based on any action you want from your app, where you can send to ALL subscribed users, All that are active, All that are not active:
Step 4. Setup push notifications for Web (desktop) browser with test. Please note that you need to have both (Chrome&FireFox AND Safari) setup, otherwise it won’t work.
I hope that I didn’t miss anything.
There is a way to check the status of a sent notification. Here’s the issue:
When we receive it, since this is not native app and it communicates with bubble, if we tap on the notification by mistake, it will open the app and that’s it. We missed the text. I’ve managed with the help of my freelancer to save the state of a notification, so if it’s not read, it will show it as a pop-up at the loading of the app, the first load after the notification was sent. So this way, if you tap on it by mistake and the app will open, until you will press OKAY, the message will keep pooping up when you reopen the app.
This is fine, but if it’s a short message it can be annoying to the user.
I was also thin king how we can redirect inside the app, once the app was opened after the notification was tapped, so it will redirect to the page that is originating from or has the destination: messages/inbox or any other part of your app. But this would load bubble with some extra workflows for each page. I still need to find a better way to do this. If you have any suggestions, please add them here on in private how you prefer.
I hope that it will help you, and that you will enjoy it!
Good luck on your projects! If there’s anything that I can help, please ask.