Skip to main content

Push Notifications via Firebase

Your app can receive and process push notifications on Android and iOS. Besides, you are able to automatically send Order Status Notifications when order status changes.

1. Setup Firebase Cloud Messaging (FCM)

iOS App

Follow steps below to enable push notifications on iOS app:

1. Execute the Firebase Settings

Create your project on Firebase. Then add iOS App into your project following this guide Firebase Settings. (Skip this step if you already did)

2. Setup Cloud Messaging in Firebase

Step 1: Open the Firebase page

Step 2: Open your Firebase project. Click the gear icon in the upper left corner, and select the [Project settings] item:

Step 3: Click Cloud Messaging as shown:

Step 4: Select your iOS app, and click Upload button:

Step 5: Click the Browse button and refer to the APNs auth key: (see the [Problem Internal Link] guide)

  • The key ID is the back part of the downloaded key file name:

  • Enter Team ID, if you do not know where Team ID is coming from, please click on the question mark as shown in the picture, then click on the membership tab

This is Team ID, copy it and enter the form in firebase:

  • Click Upload:

In some cases, this error will be displayed (in some cases it will not be). If this is the case, please click Upload again:

If the following screen appears, congratulations, you have successfully configured:

Android App

Only need to create your project on Firebase. Then add iOS App into your project following this guide Firebase Settings. (Skip this step if you already did)

2. Execute the Push Notifications feature

After finishing setting up Firebase Cloud Messaging (FCM), you can push notifications to the end-user. The end-user will receive the notifications on their smart devices.

You can choose to push notifications via FluxBuilder or via Firebase directly.

Option 1: Firebase Push Notifications on FluxBuilder

Step1: Get Server Key

Go to the following path Cloud Messaging and select your Firebase project to get Server Key

Step 2: Input Server Key into FluxBuilder

After you have obtained the Server Key, go back to the FluxBuilder App, open the Features Tab → select the Push Notification feature → enter Server Key

Step 3: Send Messages

Enter any missing information and click SEND button.

4. Note

  • Your project must have [Problem Internal Link] completely.
  • The Server Key taken must be the Server Key of that project
  • Absolutely do not share Server Key

Option 2: Firebase Push Notifications on Firebase

Instead of FluxBuilder, you can go to Firebase to push notification manually as these following steps:

  • Drag the left menu to the bottom, the Grow section will have Cloud Messaging. Click Cloud Messaging, then Send your first message:

  • Create a new messenger, fill in the messenger information, and click next:

In the Target part, select the application you want to send, here select the iOS / Android application that was configured in Firebase before:

  • Click Next:

  • The remaining steps can be ignored, continue to click Review:

  • Click Publish button:

  • Now go back to the app and check if it works:

3. Add an Icon on Notifications

To custom icon of notification item, you need to add an image field in additional data when pushing the notification like this:

That’s all :)