Skip to content

Push notifications (mobile app)

Applies to: students, instructors and school staff using the DriveFlow mobile app on Android; server administrator for Firebase configuration. Last reviewed: 2026-11-18.

Push notifications are the short alerts DriveFlow shows on Android phones signed in to the DriveFlow mobile app. They are added automatically when the school's plan includes the Mobile App; there is no push switch in the web settings.

1. What push is

A push notification is the short alert that appears on a phone's lock screen. DriveFlow sends one alongside the email whenever the notification engine handles an event, to every Android phone where the recipient is signed in to the DriveFlow mobile app.

  • Provider: Firebase Cloud Messaging through the Firebase Admin SDK (FirebasePushSender).
  • Platform: Android only. The API refuses any other platform with "Push notifications aren't available on this platform."
  • Title: the message subject, for example "Driving Lesson Confirmed". Body: the plain-text message, cut to 240 characters.
  • Android notification channel: driveflow_updates. Priority: high.

2. When a push is sent

There is no push switch in the school's settings. The engine adds push automatically when all of these are true:

  1. The event is not switched off (its Enabled switch under Settings > Notifications).
  2. The school's plan includes the Mobile App feature.
  3. Firebase is configured on the server.
  4. The recipient has at least one phone registered.
  5. At least one other channel is on for the event, or push is the only one left: push is added even if Email, SMS and WhatsApp are all off for that message.

Note

Push follows the event, not the Email/SMS/WhatsApp ticks. Switching a message's Enabled switch off stops the push too.

Events that produce a push: Student Welcome, Lesson Booking Confirmation, Lesson Reminder, Driving Test Reminder, Lesson Rescheduled, Lesson Cancelled, Lesson Request Declined, Lesson Completed, Payment Received, Payment Reminder (to the student); New Lesson Assigned, Lesson Rescheduled, Lesson Cancelled (to the instructor).

Events that do not produce a push: Invoice Issued, quotes, manual receipts, account emails, anything sent to the school. These do not pass through the engine.

Quiet hours apply to push exactly as to the other channels.

3. How a phone is registered

flowchart TD
    A["User signs in to the mobile app"] --> B{"App checks: push enabled on this phone?<br/>Plan allows the app?"}
    B --> C["Android 13+: asks permission to show notifications<br/>(once per run)"]
    C --> D["App gets a Firebase token<br/>POST api/mobile/push/devices { token, platform: #quot;android#quot; }"]
    D --> E["PushDeviceService stores: token, company, user,<br/>student (if the user is a student), last seen"]
  • The token identifies the app installation. If a different person signs in on the same phone, the phone now belongs to them.
  • On sign-out the app calls api/mobile/push/devices/remove and deletes its Firebase token, so the phone stops receiving.
  • If the session ends for any reason the app deletes its token.
  • If Firebase reports a token as unregistered or invalid (app removed or reinstalled), the server deletes that device automatically.

Who gets it

Recipient Phones used
Student Devices registered with that student's id
Instructor Devices registered to the user account linked to the instructor's profile. An instructor with no linked user account gets no push.

School owners and office staff do not receive pushes: no engine event is addressed to them.

4. Tapping a notification

The push carries the event name and, where there is one, the lesson id. The app opens:

Signed in as Event Screen
Student Payment Received, Payment Reminder Payments
Student Lesson booked, reminder, rescheduled, cancelled, completed Lessons
Student Lesson Request Declined Requests
Student Anything else Student home
Instructor Event with a lesson id That lesson
Instructor Event without a lesson id Lessons list
Anyone else Any Their home screen

5. Turning push off on a phone

Push can be turned off per phone in the mobile app's Settings. The choice is stored on the phone, not on the account: off removes the phone from the school's list and deletes its token; on registers it again. Details are in the mobile documentation: Mobile app overview.

Android's own notification permission also applies. If the user refused it, the phone stays registered and notifications appear once permission is granted in the phone's settings.

6. Platform configuration (server administrator)

Setting Purpose
Firebase key Tells the server where to find the Firebase service-account key. The key is kept outside the code and its location is private.

Behaviour at start-up (decided the first time a push is attempted):

Situation Server log Result
Setting empty "Push notifications are off: ..." (Firebase is not configured) Push silently off
File not found "Push notifications are off: the Firebase key file was not found at the configured path." Push off
Key cannot be loaded "Push notifications are off: the Firebase key could not be loaded." Push off

Important

Because the sender is created once, a corrected path or key needs an API restart.

The mobile app must be built with the matching Firebase project file; see the mobile documentation (technical notes, internal documentation).

7. How delivery is recorded

A push appears in the Notification Log like any other message:

  • Channel: Push
  • Recipient: "DriveFlow app (1 device)" or "DriveFlow app (N devices)"
  • Status: Sent if Firebase accepted at least one device, or if every failure was a stale device that was cleaned up. Failed with "Push notification not delivered: ..." otherwise.

A recipient with no registered phone produces no log row and no warning: most people do not have the app.

The Channel filter on the Notification Log page lists only Email, SMS and WhatsApp, so push rows cannot be filtered on their own; they appear under "All channels".

Students do not see push rows on their portal Messages page (that page shows email, SMS and WhatsApp only).

8. Failures and retries

Nothing is retried. Firebase itself holds a message for an offline phone and delivers it when the phone reconnects, within Firebase's own limits.

9. Local reminders on the phone (not push)

Separately from server push, the student app schedules its own reminders on the device: one at 18:00 the evening before a lesson and one an hour before. These need no server and no Firebase.

Three reminders for one lesson

A student with the app can therefore get three reminders for one lesson: the server's push, and the two local ones. See Lesson reminders section 6 and Mobile app overview.

10. Cost

None. Push uses no credits.

11. Limitations and notes

  • Android only.
  • No per-event or per-person push setting on the server.
  • The body is the email's plain text cut at 240 characters, so it starts with "Hello <name>,".
  • The comment in SystemSettings.razor ("Push is defined but nothing sends it yet") is out of date; push is sent and logged.