OneSignal Configuration

Estimated reading: 3 minutes 1918 views

As per the last update, we have changed some ways of handling OneSignal notifications, so as per the new guidelines you have to create Two One Signal Apps one for the Provider and one for the User App, and update the keys in both apps and admin panel. For each app you have to follow the below steps.

  • Now, Enter the name of the Website/App and Create the app
  • You will need to complete some steps after creating the app, they will show you how to set it up
  • Set up Messaging Channels for Your App and then click the Push Notifications button
  • Now Continue after selecting Google Android (FCM – Firebase Messaging Service) and click on Continue
  • Copy the Firebase Server Key and Firebase Sender ID now by clicking the button below “Copy from your Firebase Console”
  • Navigate to Project Settings and click on the Cloud Messaging tab
  • For Sender Id:  Go to the Cloud Messaging tab and find the Sender ID, copy that Sender ID and paste it into the OneSignal dashboard in the sender id field
  • For Server Key: In Cloud Messaging API (Legacy), click the three dots and select “Manage in Google Cloud Console.” After the page is successfully redirected, open the Firebase Console again and Refresh the Cloud Messaging tab to find the Server Key, copy that key and the Sender Key, and set it in OneSignal.
  • After successfully configuring the keys, Click Next, then select the Flutter tab and click Next again
  • Now, click on Keys & IDs to get the Rest API Key and App ID. Copy this App ID and Rest API Key and paste them into your path Web Panel (Admin panel -> Account Settings -> Configuration -> Onesignal section)

Configure Channel ID

  • Open OneSignal Dashboard and click the Setting tab-> Messaging. 
  • Scroll down you will get the Android Configuration Click on Add Group and enter the name you want. 
  • Now, You will get an option for Add channel, Click on it and enter the channel details 
  • You will have the get the edit your channel option after creating it in the previous step.
  • The dialog will open when you click the edit icon, and the channel ID will be visible at the top of the dialog.
  • Now, copy this channel ID and paste it into the lib->configs.dart file of the Android apps.

Add Segments in OneSignal

  • Choose the audience, then the segment, and finally the New segment option.

  • Following that, a dialog will appear in which you must select the user tag.

  • Following that, a dialog box will appear. In this field, enter the value shown below for the particular application.

 For User 

  1. Segment: UserApp
  2. Key: appType
  3. Value: userApp

 For Provider

  1. Segment: ProviderApp
  2. Key: appType
  3. Value: providerApp

 For Handyman

  1. Segment: HandymanApp
  2. Key: appType
  3. Value: handymanApp
Great! You have successfully configured OneSignal!

Leave a Comment

Share this Doc