Comment to Nexus
  • Cnayl - Getting push notifications to work on Android (both natively and web push) is relatively easy especially compared to iOS. That said, it is a multi-step process with at least 3 different systems, accounts, passwords and I have found it to be occasionally unreliable but its unclear to me where the potential reliability issue is. 

    These are my opinions based only on my experience which 6 weeks ago I didn't even know what an API was or had heard of React so consider that as well as UNA/Boonex may not agree with my opinion so just to make clear its at your own risk.

    The first thing I think you should do is go to OneSignal and create a free account. You'll have to review the free/paid tier and decide what you need. You can then go through the fairly well done documentation they have and create your "app" and enable Web Push for Chrome and the other browsers as well as for Android if those are your intentions. The OneSignal documentation will guide you to Firebase which is Google's platform for a whole bunch of technologies including Push Notifications. You will have to create an account and review the free/paid tier here as well. It will have you create a key which you will enter back in the OneSignal Dashboard. There may one or two other things I missed but their documentation is good.

    Once you finish creating your "app" in OneSignal it will issue you a couple keys. You then take those keys and copy and paste them back at your site. The place to paste the keys is Studio > Settings > Push Notifications. 

    Check the settings there, save and then you need to modify a line of code. If you have your app running (even in the emulator) and it is displaying your site (not UNA.IO) then you should have no problem finding the line of javascript in app.js (I believe) where you will enter your OneSignal Key from the first step.

    Once that is done you can recompile and do all the saving on the site and then test either back at OneSignal in their dashboard or just opening the site in Chrome on Android and if you did everything right you will get a pop up asking for permission to send notifications.

    I hope this is helpful to you and anyone else trying to work through this challenging process like Hodor Hodor, Will Monte, Harry Sondre, Expertzkris or anyone else.

    Before anyone asks, I can't help with iOS notifications. It is much much too complicated and when you account for the additional requirements of their security and developers fees its beyond my ability to assist.