🔔

Push Notifications

How to set up and sent push notifications to your app users.

Requirements - Mobile device (Android or iOS)📱 If sending to a published app: - A Google account - Apple Developer account 🛠 with Admin role

🎨 Set up design file with Bravo Tags

Action: enable notifications (Bravo Tag)

The first step will be adding the action into your design a button or a page to explain to the app user about the push notifications with an action to enable Push notification alert.

Tag: [action:enablenotifications]

image
💡

If the action for enable notification is in a group, the tag will need to be added to ALL elements. See how it's set up on the sample app.

💎 Sample Figma file

💎 Sample Adobe XD file

👏 Notification in Bravo Vision (testing environment)

You can test the push notification on Bravo Vision before your app is published.

💡

You must have to have the app open in Bravo Vision to see the push notification in Bravo Vision.

💡

The Enable Push notification trigger is required only once per app. If you are testing in with Bravo Vision and you have already enabled "automatic updates" in Bravo Vision, then you will not get the alert to allow notification in your app as it is already enabled.

⚠️

Remember to first add the tag in your design + trigger the action in your mobile device to see the notification coming. If not you will get an alert in Bravo Studio with this error message: There are no users online to receive the notification.

On your app project page, go to the Notifications tab and you can send a test notification directly via Bravo Vision.

image

📱 Notifications in published apps (live environment)

Steps to follow

🍏 iOS - Apple push notification service Certificate (APNS)

An iOS Push Certificate is required for notification delivery to all iOS apps.

Step 1 - Requirements:

Steps

🔑 Get Certificate From a Certificate Authority (Keychain)

🔑 Request a Certificate From a Certificate Authority

Open the Keychain Access app on your macOS system. It may be located in Applications > Utilities > 🔑 Keychain Access.

Select Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority...

image

Next, select the Save to disk option and enter your information in the required fields.

This creates a certification request file that will be used later.

image

🔔 Get Apple Push Notification Service SSL

Create A Certificate Request Manually

Push notifications require a specific certificate for each of the apps. To generate this certificate we will access the Apple Developer Portal and go to the Certificates section.

image

Inside the Certificates section, click the (+) sign to add a new certificate and scroll down

image

Until you find the Apple Push Notification Service SSL (Sandbox & Production), double-check you select the Sandbox & Production one.

image

Click Next and on the next page select the App ID you want to configure the Push Notifications

⚠️

(the App ID WITHOUT the OneSignalNotificationServiceExtension).

image

Click Continue and now we will need to upload a Certificate Signing Request (same as we did for the Certificate). Now we have the file created we will upload it to the Apple Developer Portal so we can finish creating the Push Certificate.

image

Once we upload the file and click on Continue, we can download the Push certificate.

image

Check the File on your computer:

image

Now, Go to the Keychain Access apps to search for the Apple Push Certificate

Select Login and My certificates, and you should see a certificate called

"Apple Push Services ...." (If it is not there try double-clicking in the downloaded file).

💡 You can also search by "Apple Push..."

image

Export it and Upload it into Bravo, be sure you have the certificate selected and it's folded, click the right button and select "Export ..."

⚠️

You will be asked to enter an optional password, add one if you want but be sure you remember it later. After entering the password, it asks your computer user password to finish the export.

image

👏 Configure to Bravo Studio

Now we can upload the p12 certificate file to Bravo and enter the password of the certificate (if we added one).

App Project > Settings > Upload Apple push notifications service Certificate

image

📦 Request New App Packages

A new app build will be required to upload the new version into the App Store & Google Play. Guide how to generate the builds here

🎉 Congrats! Now you can send Push notifications to your published apps.

image

Continue with 🤖 Android below 👇

🤖 Android - Firebase Server Key

Firebase Server Key

Requirements

  • An Android mobile app, Chrome app or extension, or an Amazon app.
  • Google account

What is a Firebase Server Key?

A Firebase Server Key and Firebase Sender ID are required in order to send push notifications to Android mobile app devices.

The goal of this section is to provision your Firebase Server Key and Firebase Sender ID for use in OneSignal.

Step 1: 🔥 Create A Firebase Project

If you already have an FCM project you would like to use with OneSignal, you will need to retrieve your Sender ID and Firebase Cloud Messaging token. You may then skip to Step 2.

1. Visit the Firebase Console and sign in with your Google account.

image

2. Click CREATE NEW PROJECT or select an existing one below.

image

3. Enter a project name and press CREATE PROJECT.

image
⚠️

If you publish several apps with your Bravo account, you should create one Firebase project for each app. You can't reuse the tokens for more than one app.

Step 2: 🔑 Getting Your Firebase Cloud Messaging Token And Sender ID

Click the gear icon in the top left and select Project settings.

Select the CLOUD MESSAGING tab.

Save the two values listed under Server key and Sender ID.

image

Step 3: 👏 Configure Your Bravo App

In your app project, then go to the Settings tab. 📝 Paste your Firebase Server Key and Firebase Sender ID into the fields of the Cloud Messaging section.

image

Step 4: 📦 Request New App Packages

A new app build will be required to upload the new version into the App Store & Google Play. Guide how to generate the builds here

🥳 Done! You now have a key to send push notifications from your 🤖 Android published app.

image

⚠️

If you get this message in Bravo Studio when trying to send a push notification: There are no users online to receive the notification. It means no users have enabled push notifications yet.

That's it! 🎉