Use Firebase to send push notifications from a branded Android or iOS app. By default, branded apps do not support push notifications.
At a high level, in the following procedure you'll enable permissions to a service account in Google Cloud Platform that we provide, and you’ll need to provide AppSheet with your service account email from your Firebase project.
Enabling push notifications requires the creation of a Firebase project which provides the infrastructure required to send and receive push notifications. If you don't have a Firebase account or project, create them as described in Create a Firebase account and project.
If you are configuring both Android and IOS branded apps for the same AppSheet app, you need to use the same Firebase project. The Firebase Admin SDK email you set in the following procedure will be the same email used to send both Android and IOS branded app notifications.
To enable push notifications in your branded apps:
- Sign in to AppSheet.
- Open your app.
- Go to Manage > Deploy > Branded Apps section of the editor for you app.
- Click Notifications.
- Click Allow Firebase Notifications.
The Notifications dialog is displayed. - Copy the email provided at the top of the dialog starting with app-.
- Sign in to the Firebase Console and navigate to your project.
If you already branded your app with notifications, you must use the same Firebase project that you used originally to brand the app.
To confirm the Firebase project used for Android branded apps, compare the following values:- Application ID for the app
In the AppSheet app editor, go to Manage > Deploy > Branded Apps > For Android.
- Package name for your app in the Firebase project
In the Firebase console, navigate to the project, click > Project settings > Your apps, select your app, and view the Package name in the SDK setup and configuration for your app.
To confirm the Firebase project used for iOS, compare the following values:- Bundle ID, configured when creating an application ID for your branded app in the Apple Developer console.
- Bundle ID for your app in the Firebase project.
In the Firebase console, navigate to the project, click > Project settings > Your apps, select your app, and view Bundle ID in the the SDK setup and configuration for your app.
- Application ID for the app
- Click > Project settings.
- Click Service accounts, then click Manage service account permissions.
The Google Cloud Console opens and the Service accounts page is displayed. - In the left navigation, click IAM and then click Grant access.
The Grant access dialog is displayed. - In the Grant access dialog, do the following:
Service account permissions can take up to 10 minutes to take effect.
- In the New principals field, paste the email copied in step 6.
- In the Role field, type Service Account Token Creator in the Filter field and then select it in the drop-down.
- Click Save.
- In the Firebase Admin SDK section, copy the Firebase service account email.
- Return to the AppSheet editor.
- In the Notifications section, paste the Firebase service account email you copied in step 12 into the Firebase Admin SDK field.
- Save the app.
-
Complete the configuration by performing one or both of the following steps for Android and iOS branded apps:
- To test the configuration, send a broadcast notification.
A notification is sent to mobile devices that have the branded app installed.
If the broadcast notification fails, an error message is returned describing the issue. To troubleshoot a failed broadcast notification:
- Make sure you are checking on the devices that explicitly have the iOS (
ipa
file) or Android (apk
file) branded app installed. For example, if you have a device with only the non-branded version of the app installed (that is, the app was accessed using the App Gallery from the AppSheet app installed from Google Play or iOS App Store), the broadcast notification won't be delivered to that device. - Review the steps described above and make sure that there are no errors.
- Ensure that the email copied from AppSheet is visible in the Service accounts page as a principal with Service Account Token Creator permission.
- Wait 10 minutes after granting the service account permissions to ensure that they take effect.