How To Use Push Notification and Topics feature
Push notifications are a common feature of most mobile applications. Our push notification feature allows you to update and inform your users about new developments. The topics feature allows you to create topics your users can subscribe to. In this article, we are going to use the Topics and push notifications feature to build an app that sends updates and messages to your users based on what topic they subscribe to. Kindly follow the steps below to learn how to do this. If you require a visual aid, please watch this video; it thoroughly explains this article. Now let’s get started.
In order, to configure the new OneSignal push for Swiftspeed Appcreator
- You will require a Firebase account for Android & an Apple developer account for iOS
Add a new app to your one signal account, and give it the same name as your application in Swiftspeed Appcreator
Select Android to start
Now go to your Firebase console and if not done yet, create a new application
Or follow the one signal documentation
https://documentation.onesignal.com/docs/generate-a-google-server-api-key
Disable Google Analytics for now, you’ll be able to configure it later if you want to use it.
Configure a new Android app, click on the rounded android icon in the middle of the page
Paste your application package name from Siberian, and your app name, then next/skip all other steps
Go back to your firebase console homepage, then click on the gear on the top left of the page,
then open the Cloud messaging tab
Click on the three dots beside API Cloud Messaging (old version) then activate the API
Go back to this page and reload, now you have access to both a server key and a sender id
Now that your application is created & configured, you can paste your keys in OneSignal
Save and continue, then select Cordova as the SDK, continue
Now just click done!
Now you can navigate to the page Keys & IDs that’s the keys you will have to copy inside Siberian.
While you have configured only Android for now, these keys will work for both Android & iOS
However, you will still have to do some steps to configure iOS
Go to the Settings > Api page of your mobile application
Then paste your app id and key
After what you will be able to import older devices
Configuring iOS
Go to the platforms page &Â add Apple iOS
For more in depth and help to create a p12 key, please check the onesignal documenation below
https://documentation.onesignal.com/docs/generate-an-ios-push-certificate
Upload your key, then save & continue
Same as for Android, slect the cordova SDK, then next, you’re done!
Sending a push
To send a new push, first add the push v2 feature to your application
Then fill a Title & Message, you can also schedule your application in the future
Note: The scheduling is timezone friendly, the message will be sent at the given time, depending on the user timezone, default delivery time of day if left blank is 9:00 AM
Hit Send message