Push notifications with Firebase
Push notifications are sent through your own Firebase project, so your customers' devices are registered under your account, not ours. Firebase is free for this use. Set it up once; it takes about 20 minutes.
- A Google account for the Firebase console
- Your Android package name and iOS bundle ID, from the Store listing step
- An Apple Developer account, for iPhone notifications
- 1
Create a Firebase project
Open the Firebase console (console.firebase.google.com), choose Create a project and give it your brand's name. Google Analytics is optional.
- 2
Add your Android app
In the project, choose Add app › Android. Enter your Android package name exactly as on the Store listing step, register the app and download google-services.json. You can skip the other steps Firebase shows.
- 3
Add your iOS app
Choose Add app › Apple (iOS). Enter your iOS bundle ID exactly as on the Store listing step, register the app and download GoogleService-Info.plist.
- 4
Connect Apple push notifications
iPhones only receive notifications through Apple, so Firebase needs a key from Apple:
- In your Apple Developer account, open Certificates, Identifiers & Profiles › Keys and add a key with Apple Push Notifications service (APNs) turned on. Download the .p8 file (Apple lets you download it once) and note its Key ID and your Team ID.
- In Firebase, open Project settings › Cloud Messaging, find your iOS app under Apple app configuration and upload the key with its Key ID and Team ID.
- 5
Upload the two files to Yallapp
In your dashboard, open App setup › Publishing and upload google-services.json and GoogleService-Info.plist under Push notifications. We check that each file matches your package name or bundle ID. Notifications work from your next build.
- 6
Create a service account key, to send messages
In Firebase, open Project settings › Service accounts and choose Generate new private key. A .json file downloads. Keep it private: it lets its holder send notifications to your app.
- Apps connected to a platform, or without a website: upload it on the dashboard's App notifications page. It's stored encrypted.
- Your own API: use it in your own system to send notifications to the push tokens the app registers.
- WordPress: in WordPress admin, open Yallapp and upload it under Notifications (Firebase). It's stored encrypted on your website.
- 7
Send your first notification
- Apps connected to a platform, or without a website: on App notifications, write a title and a message and select Send to everyone. Everyone gets it in the app's inbox; phones that allow notifications also get a push.
- WordPress: choose which events send a notification automatically (a new lesson, an announcement, a confirmed enrollment, an answer to a question), or write one under Send a manual notification in the plugin's settings.
- 8
Campaigns: to the people you choose
On App notifications › Campaigns (apps connected to a platform, or without a website), a campaign goes to everyone or to some of your customers: people who bought something, a course's students, members with an active membership, or people who haven't opened the app for a while. You can narrow it to the language the app shows on their phone, iPhones or Android phones, and the country they sign in from. Add a picture from your Media and choose what it opens: the app, one of its pages or a web page. Send it now, at a date and time, or every week on a day and time; save it as a draft to send later. Each campaign shows how many people it went to, the phones the push reached and missed, and how many opened it (counted each night). Campaigns come with every plan and count with your other notifications, up to 10 an hour. Apps on WordPress have campaigns too, under Campaigns in the dashboard's menu: they go to everyone, and your website puts them in the app's inbox, pushes them and sends back how many phones they reached (Yallapp plugin 0.4.12 or later).
- 9
Automatic notifications
Apps connected to a platform, or without a website, also send notifications on their own, in each person's language: a new lesson to a course's students, an appointment confirmed and a reminder the day before, a class two hours before it starts, an event the day before, a membership three days before it ends, a cart left for three hours, and the daily study reminder students turn on in the app. Each goes once to each person. On App notifications › Automatic notifications you see how many people each one reached and opened in the last 30 days, and turn off the ones you don't want.
People choose which notifications they get in the app's settings. If notifications don't reach iPhones, check the APNs key in Firebase's Cloud Messaging settings first.