Setting up Push Notifications for Android and iOS apps and Firebase Analytics

Push notifications are used to send messages to the users even when they are not using the application. For example, when you launch a new product or give a discount to products, your customers can be informed with a push notification that appears on the Notification bar of their iOS and Android device. This increases the retention and engagement of users with the app. You can send the order status to your customers when required. 

Follow the steps given below and finish setting up your Android and iOS push notifications:

Note: For iOS, there are a few additional steps before you are done.

Step 1: Go to Firebase and create an account

Step 2: Click Go to console and then select Create New Project

Step 3: Give a project name and Add Project to continue

Step 4: Select a Firebase account and click on Create Project. Now your project is ready

Step 5: Click Continue, the project overview window appears

Step 6: Select the Android symbol. The Register App window opens

Step 7: Enter the Android package name. For package name, Go to Dashboard and copy package name from API credentials

Step 8: Click Register app

Step 9: Download the Config file. Click Next and skip for steps 3 and 4 (add firebase SDK and Run your app to verify installation).

Step 10: Now, upload the Config file as given below:

  1. Go to Dashboard and select Update App
  2. Click ADD-ONS
  3. Enable Push Notification
  4. Upload the file (Android) and click Submit

Step 11: In the Project Overview window, Select iOS

  1. Go to Dashboard and select Update App
  2. Click ADD-ONS
  3. Enable Push Notification
  4. Upload the Firebase iOS config file and click Submit

Step 12: Follow the same steps as done for Android:

Download Config file and upload it in the ADD-ONS (iOS)

Now you can see two apps in Firebase.

Step 13: Click on the Settings and select Cloud Messaging

Step 14: Copy the Server Key from the Settings page of the Firebase Console and paste it on the ADD-ONS page

Step 15: From Dashboard Settings, select Orders

Step 16: Paste the FCM server key here also

For iOS, a few more steps need to be done to setup Push Notifications

Step 1: Login to Apple developer account

Step 2: Go to Certificates, Identifiers & Profiles, select Keys and Click + to create Key

Step 3: Enter Key Name as Push Notification and check APNs box. Then click Continue

Step 4: Copy the Key ID and keep it safe. Download the file and keep it secure. (This is Important)

Step 5: Go to FireBase Console and select your project

Step 6: Go to Project Overview and select Project Settings

Step 7: Under APNs Authentication Key and upload the file you downloaded before

Step 8: Enter the Key ID in the Upload APNs auth key box

Step 9: Copy the Team ID from here and paste in the Team ID field in the Upload APNs auth key box

———- END ———-