Hi,
In this tutorial I explain how can you configure “Push Notification Component” in your app and use it to send Push Notifications to those devices which installed your app.
Requirements:
- Google Firebase Account.
You can create one here - OneSignal Account.
You can create one here - Drag/Add Component “Push Notifications” located under “Experimental” palette to the Screen.
(Update: Now you will find it in the category “Social”)
How to:
PART 1 Setting up firebase account.
Step 1: Signup/Sign to Firebase and Create New Project. Enter Project Name (I used my App name here) and my Country(where I reside). Then click on “Create Project”.
Step 2: You will see below screen after creating new project.
Select “Add Firebase to your Android App”.
Step 3: After that new popup window appears.
Here you need to enter Android package name which is like “com.makeroid.android.madan99022.YOURAPPNAME”
Other are optional. Then click on “Register App”.
Step 4: You nee to do nothing here. Just click on “Continue” and “Finish”
Step 5: Click on “Settings Icon” then select “Project Settings”.
Step 6: Click on “Cloud Messaging”.
Step 7: In this Screen you need to note down Two things: 1. Server Key &, 2. Sender ID. Which you need to enter these keys in your “OneSignal” account.
PART 2: Setting up “OneSignal” account.
Step 1: Create a new account or sign in to “OneSignal”.
Then click on “Add New App”.
Step 2: Enter your app name, Click on “Create”.
Step 3: You will get a popup like the one below. Select “Google Android” then click on “Next”.
Step 4: Enter previously noted “Server Key” in “Google Server API Key” and “Sender ID” in “Google Project Number”. Then click on “Save”.
Step 5: In next window select “Native Android” and click on “Next”.
Step 6: Notedown your App ID and enter the same on Makeroid–> PushNotifications–>Properties–>“OneSignal App ID”.
Step 7: Build your app on “Kodular” and install it on your Mobile device.
Step 8: After successful installation of app. You wont get any error after click on “Check Subscribed Users” in OneSIgnal. Then Click on “Done”.
PART 3: How to send notifications.
That’s it! You are done.