Forum Documentation Showcase Pricing Learn more

OneSignal FREE plugin for FREE and UNLIMITED Push Notifications 📱


#103

I’m using dropsource to wrap my bubble app. Does anyone know what the js bridge would be to get the player id to populate from onesignal? The ones in this thread or in pastebin don’t seem to be working.


#104

I was not within a wrapper. It was intended for a PWA - progressive web app (added to home screen app). Managed to make it work for desktop browser notification but not for PWA…


#105

Hey @mattmazzega! Still no luck with finding a solution for the PWA?

Was stuck on that myself a month or two ago, and now coming back from a hiatus to try again (was planning to have an iOS download, but just stick with a PWA for android)


#106

Hi @merav.leviten
For PWA on Android, notifications are working. With PWA on IOS, notifications are not possible…


#107

Hi, can anyone suggest me how to send push notifications only to the specific category of the user using OneSignal?


#108

Excellent work putting this together @mvandrei
I bet many bubblers have benefited from this post and your plugin.

The code provided for the web didn’t work for me, Although, I manged to get it to work using the below code:

OneSignal.isPushNotificationsEnabled(function(isEnabled) {
if (isEnabled) {
// user has subscribed
OneSignal.getUserId( function(userId) {
console.log('player_id of the subscribed user is : ’ + userId);
// Make a POST call to your server with the user ID
bubble_fn_1(userId)
});
}
});


Push Notifications Options
#109

I’ve been using a single “space” in the URL field so a push doesn’t load a URL at all, which has worked for the past 3 months - thanks Jameson! However, this hack has recently been causing my hybrid apps to crash if the user receives the push while the app is open.

I’m using SuperView as the web wrapper for iOS. Haven’t changed anything - same iOS devices iPhone 5 and 7, iOS 11.3 (hasn’t been updated since I’ve used the single “space” trick). Just thought I’d post this here in case others have a similar issue. Will update if I find a solution.

Edit: Haven’t changed anything again, but push notifications are no longer causing my app to crash :slight_smile: Concerning inconsistent behaviour, if I work out why this is, I’ll update here.


#110

Some tips for using the Javascript to Bubble:

Make sure it is “visible” on the page, although it can be tiny and underneath something else.

If you enable the “event” option, you can start a workflow from the event triggered by running bubble_fn_1(value). The workflow will then run at the right time to ensure having the value passed in.

image


#111

I’ve also played with the REST API, and found if you leave out the url, clicking the notification opens the root domain of the app, i.e. https://myapp.com or https://myapp.bubbleapps.io (no version_test).
This seems fairly useless, so may as well point to a page and parameters that have some meaning to the notification.

@mvandrei there are a lot of possible combinations of parameters for the create notification API call.

I suggest making (another call) the entire JSON body as the only parameter, and have something like what you have now as a sample value. Its harder for the Bubbler to edit, but much more flexible. The only downside is having to put the APP-ID into each call in the workflow.


#112

I’m trying to develop a web app (mobile). The prompts (bells) for allowing notifications do show up, however the user never gets registered despite me clicking to subscribe many times. I can’t figure out what is going on and I’m not familiar with any JS.

Edit: The problem was that there was no OneSignalSDKWorker.js file. Can’t find mysite.com/OneSignalSDKWorker.js

Is this something wrong with the plugin or my setup on Bubble or OneSignal?


#113

If your app is on a paid Bubble plan, you can host the three files OneSignal looks for.
If your app is on the free plan, you can use OneSignal’s “non-https” option, where they host the files for you on a subdomain of their site named after your app.


#114

Thanks! Mine is on a paid plan and I’ve tried the hosting files in the root directory option under SEO/Metatags, but it doesn’t seem to work. I still can’t access mysite.com/OneSignalSDKWorker.js, it returns the 404 page.

How does one go about hosting the files to make sure it shows?


#115

Some possible traps in this topic:


#116

Thank you! That solved my issue.


#117

Hey guys! Has anyone found an elegant way to send an individual push message to multiple users? (i.e. when a user messages a list of friends)

I thought that scheduling the API workflow on a list might be handy, but it won’t trigger external actions, i.e. this plugin.


#118

I suggest use the API Connector Plugin, make your own API call to OneSignal “notifications” …


This is what I put in the value, approximately …
{ "app_id" : "APP-ID", "data": {"foo": "bar"}, "contents" : {"en" : "text"}, "include_player_ids" : ["PLAYER1","PLAYER2"], "url" : "https://example.com", "headings" : {"en" : "title"}, "ios_badgeType" : "Increase", "ios_badgeCount" : "1" }

This setup for the API call lets you use most of the options as described in OneSignal’s API doc. They recommend setting up “Segments” or groups of users to send to at the same time.

Yes you could schedule an API workflow to do the API call as above.
: )


#119

Hello, I’m also having issues to get the player ID from android devices, I tried this but I don’t get the player Id…
Could you please tell me what do I need to be able to get the player ID?
Thanks


#120

Hey @hguerrero, what is your set up?

This is mine. Let me know if this isn’t clear!


#121

Hey @merav.leviten,

Did you find an easy and elegant solution? I have the same issue right now, did you go through the API Connector as suggested by @mishav?

I cannot create segment on OneSignal as the group is dynamic and changes often. I would like to send directly individual messages to a dynamic list of users. Your input is much appreciated.

Best,
Daniel


#122

Hey @mvandrei,

first of all thanks a lot for your free OneSignal plugin :slight_smile:

Second, I’m facing an issue following your instructions.
I can do everything except use CURRENT USER in the field WORFLOW DATA

So, I think it’s for this reason that it does not save anything in my DB.

Should maybe add also the JS BRIDGE code from the web view documentations?