• I could not get things working with just FireBase, but, I am able to send a push notification through the OneSignal Dashboard and it is received by the app. However, I am still unable to get notification from BuddyPress activities and I can not save preferences in user profiles.
    I can see the device tokens in my PNFPB settings as OneSignal. Not sure if the PNFPB is not talking to OneSignal or what.

    Any help would be awesome.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Murali

    (@murali-indiacitys)

    Please download 1.84 version released today, please check onesignal push notification. I have verified in test site, it is working, it will also work in app because all device tokens are maintained by onesignal database when onesignal option is enabled. So according to your settings in onesignal to send notifications to both desktop and mobile app, then it will be sent to both. Please verify whether you are using correct credentials in WordPress onesignal plugin.

    When onesignal option is enabled in PNFPB admin settings then PNFPB plugin will work along with WordPress onesignal plugin to send notifications using OneSignal. Please make sure you installed onesignal plugin along with correct credentials which you enabled in onesignal dashboard for both mobile and desktop. Please also use today’s 1.84 version, i have fixed some minor warning duplicate onesignal variable definition. If you need more help, send me screenshot of your console message of your site to my support email id mentioned in admin area for more help.

    Thread Starter egongb

    (@egongb)

    Thank you so much for your prompt support! I did upgrade today to the latest PNFPB version. I put my site in safe mode and ONLY enabled Buddypress, PNFPB and OneSignal, I am unable to save setting even on desktop browser. When I inspect my running service workers in browser, I do see:
    OneSignalSDKWorker.js
    Received 4/7/2024, 12:47:54 PM
    Status#36 activated and is running
    &
    pnfpb_icpush_pwa_sw.js
    Received 4/6/2024, 4:27:40 PM
    Status#30 activated and is running

    So I know they are both running. I am also able to send a message through PNFPB through the One Time Push in admin setting and it is received by my webview app via OneSignal. So, those are talking.
    I did make sure that the service worker was enabled in admin settings and for troubleshooting, I deleted all device tokens which wont effect many people right now. I do see the app was storing OneSignal tokens. So thats good.

    Plugin Author Murali

    (@murali-indiacitys)

    Front end settings are currently for only Firebase based push notification. Service worker for one signal push notification is only OneSignalSDKWorker.js and PNFPB service worker will not be taken for onesignal push notification.

    If you activate this plugin by default PNFPB service worker will be registered and if you enable onesignal option then it will take service worker from Onesignal plugin and PNFPB service worker will not be used even if it is active because at a time only one service worker can be used for same scope.

    Front end settings require PNFPB service worker because it requires device tokens generated from Firebase but Onesignal is generating token in their database and it is not communicated in Onesignal plugin , there is no api to get One Signal token for security purpose, so it is difficult for frontend settings to store against proper device token.

    OneSignal device tokens are directly generated in their backend not in WordPress due to this problem, we cannot store frontend settings option against OneSignal token in WordPress, I need to analyze OneSignal apis to find better way to store front end settings against some identity from Onesignal, so that front end users can control the push notifications.

    when notification for logged in users are turned on in admin settings with onesignal option ON then If user is logged in then their user id is stored in WordPress PNFPB database table for onesignal in device token table (only user id and instead of device token, it will be listed as onesignal) and it will also store user id as external id in onesignal dashboard against onesignal device token in Onesignal database. I am thinking to enhance this option in next release to store front end settings in this record , so that front end settings control will work only for logged in users, until this is implemented in this week in few days, please turn off front end settings in admin area when onesignal option is turned on. I will let you know once it is implemented. This is only way we can communicate with Onesignal and PNFPB by using userid as common field between Onesignal external id (dashboard) and PNFPB plugin to control push notifications in frontend.

    • This reply was modified 7 months, 3 weeks ago by Murali.
    Thread Starter egongb

    (@egongb)

    Thank you so much for the support!!

    I am pleased to announce that I got the push notifications working now with OneSignal.

    The issues I have is some notifications are not passing the variables. I’ve seen it with messages and a group activity. It’s reads as “[member name] posted a post on MySite” and “TestUser posted in [group name] on MySite”

    It will be amazing once the front end subscription options are enabled so EVERY activity post and comment are sent via push notifications, but thank you so much for working on that.

    This is an amazing plugin!

    Plugin Author Murali

    (@murali-indiacitys)

    I am looking into it, I will include shortcode fix in upcoming release along with frontend subscription options (under front end menu Buddypress-profile-settings). It will be released on Tuesday 16/04.

    Plugin Author Murali

    (@murali-indiacitys)

    Are you getting below for POST or BuddyPress activity?.

    It’s reads as “[member name] posted a post on MySite”?

    I found [group name] shortcode problem, i will fix it in 16/04 tuesday release but for above member name shortcode, Please let me know whether you are getting in WordPress post type or in BuddyPress activities

    Thread Starter egongb

    (@egongb)

    I am unable to replicate right now, but I am pretty sure it came from direct messages. I use Better Messages which it’s not sending a push for these messages right now, even with my PHP snippet that I’ve sent to you.

    i did however receive a push from a group activity from a group I’m not in. It may be because I also have a snippet that hides group activity if your not in that group. May be something I will have to check on my end to prevent this type of notification because it’s also a hidden group. There is also no group subscription button anymore.

    Thank you.

    Do you have a PayPal or other system to accept tips?

    • This reply was modified 7 months, 2 weeks ago by egongb.
    Plugin Author Murali

    (@murali-indiacitys)

    Group subscription push notification is currently available for Firebase push notification with subscribe/unsubscribe button. Since onesignal is having their own database, i included it only for Firebase. I will try to include group subscription button for onesignal in next release. I will try to use similar logic like frontend subscription data to store data with local field in PNFPB database table for group subscription button also. I will update you on this. For other queries, my support email id mentioned in push notification admin settings.

    Plugin Author Murali

    (@murali-indiacitys)

    Today 1.85 version released with following updates, please verify group subscription/unsubscription and frontend settings for one signal

    1.85 version Apr 16 2024

    • New feature for Onesignal Push notification: Frontend push notification settings for onesignal push notification for BuddyPress frontend users. Frontend user will be able to subscribe/unsubscribe various BuddyPress related push notifications. Frontend push notification menu is available in BuddyPress user profile -> settings -> push notification subscription.
    • New feature for Onesignal Push notification: BuddyPress group push notifications with subscribe/unsubscribe group push notifications for every group are available for Onesignal push notifications.
    • Changes to make it compatible with PHP 8.2 version.
    • Replaced bp_core_get_user_domain function with latest version of BuddyPress function bp_members_get_user_url to get members click url in push notification.
    Thread Starter egongb

    (@egongb)

    Thanks for the update.

    The group subscription button is back.

    It would not save my settings for front end subscription until I subscribed to group notifications on my webview. So, perhaps it’s with initial registration/subscription. To be fair I do have the dialogue box disabled. I can definitely work with this. I may try to make a snippet to automatically subscribe on login.

    Thanks again sir!

    Plugin Author Murali

    (@murali-indiacitys)

    I have attached screenshot showing how to enable BuddyPress activities group push notification and also I have attached screenshot showing private message notification using better messages plugin for your reference. Please always use BuddyPress activities option (ON/OFF) along with radio button for all activities or group activities, please see in right side of desktop screenshot (2nd screenshot), it shows push notification from private message using Better Messages plugin

    • This reply was modified 7 months, 2 weeks ago by Murali.
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘OneSignal webview’ is closed to new replies.