I’m using GoNative and I’ve got push notifications working. The last step I need to do is somehow store the Player ID (an ID OneSignal stores to associate a specific device with a specific person) that GoNative kicks out and associate it with the currently logged in issue.
Such as using Javascript Toolbox plugin to run this Javascript and then send it to a Javascript-to-Bubble element:
function gonative_onesignal_info(info) {
console.log(info);
bubble_fn_1(info);
}
But it never puts out any info or is undefined. I’m VERY inexperienced with Javascript, based on those instructions, how would you get this data from GoNative and get it into Bubble?
If I need to elaborate any further please ask, I’m terrible at this and have been pulling out my hair all day trying solutions. Thanks.
P.S. I think this person was trying to accomplish the same thing but a different way: GoNative & OneSignal - How to link to a specific Bubble User
But what he is describing is way over my head, I don’t know how to do anything he described before he reached his problem lol
That’s got a picture of my JavascripttoBubble element, my HTML element, and the workflow. That’s all I did on the Bubble end.
Don’t forget to turn on push notifications in your GoNative settings. These are what my settings look like: https://i.imgur.com/n0w57lb.png - Make sure Method #1 - Full Javascript is checked, and make sure to put in your OneSignal ID.
Hi Josh4 ! Please I have the same problem ! I don’t know how to get Onesignal UserID with GoNative App. I tried the first method but it never puts out any info or is undefined. Please ! I need help !
Just install that plugin and follow my instructions in that post and it should work.
And to be clear, this is specifically if you are using Bubble in a GoNative wrapper (https://gonative.io/) that already has push notifications enabled and linked to a OneSignal account (who provides the push notifications). What I am describing is how to store the OneSignal unique ID and associate it with a single account so you can send a push notification to a particular user. If this isn’t exactly what your setup is, this post has no application for you.
Thanks Josh. Is this solution still working out for you? Also, what pricing/package would you suggest for a first time potential buyer of GoNative? Thanks!
It’s still working out so far! We bought the single license + push notification package, I believe it came to around $800. Didn’t need any of the other add-ons or publishing services, I’m familiar with the app stores and how that works. There are definitely quirks and bugs to having a web app wrapper, but it beat just having a web app as our business really needed the push notifications to function properly.
Our use-case is basically a proof of concept app, and we’ll be transitioning to a native solution when we can afford to. So this setup is working for us but it just depends on what you are expecting from it.
I have an exactly same configuration, and I cannot get the PlayerID … the Javascriptelementobubble do not get any data, this config works for IOS or Android?
Actually, I succeed to make it works as well following your recommendation, in my Gonative setup , the only difference with you, is I have all the Push notification activated.
I think the reason I failed too many time is because I forgot something:
Once the process is implemented, it seems you need to delete the app from your phone, and reinstall it, to have the notification “xxx want to sent you notification etc…” then when you click ok, the phone is registered as user (player ID) on the OneSignal website , then your code can retrieve the data.
On android there is no notification, but same logic
I guess that’s also the same logic with all the other method I tried.
Has anyone been able to get this to work? I am currently testing this and it is getting the player_id into the javascript to bubble. Could anyone help me?
Hey guys, @josh4, Thanks for the tutorial - I appreciate it - it’s very helpful!
I’m wondering if you need to put the java element and html on every page - I noticed you placed it on the footer. One of my main pages doesn’t contain any footer.
Is there a reason you need to do this or can I strategically place it on one page i.e the login page or wherever?
Also, how exactly does this get triggered?
I also see you run the script every time your users ID doesn’t match up with the javascript value… can you make it so that it runs if java value is not empty And current users onesignal ID is empty? Or does the value change every so often?
Thanks for the help, any is appreciated!
Best,
Jason