Overview
Push notifications let FERAL send proactive alerts to your phone — health warnings, calendar reminders, smart-home events — even when the app isn’t in the foreground. FERAL supports both Firebase Cloud Messaging (FCM) for Android and Apple Push Notification service (APNs) for iOS.Firebase Cloud Messaging (Android)
Create a Firebase project
Go to the Firebase Console and create a new project (or use an existing one).
Generate a service account key
Go to Project Settings → Service Accounts → Generate new private key. This downloads a JSON file.
Apple Push Notification service (iOS)
Create an APNs key
In Apple Developer → Keys → Create a Key. Enable Apple Push Notifications service (APNs).Download the
.p8 key file. Note the Key ID shown on the page.Find your Team ID
Your Team ID is in the top-right of the Apple Developer portal, or under Membership Details.
Notification Types
FERAL sends different notification categories depending on context:| Category | Priority | Example |
|---|---|---|
health_alert | High | ”Your heart rate spiked to 142 bpm during rest” |
calendar | Normal | ”Team standup in 15 minutes” |
smart_home | Normal | ”Front door unlocked at 11:42 PM” |
proactive | Low | ”Based on your sleep score, consider an earlier bedtime” |
approval | High | ”FERAL wants to send an email — approve?” |
Device Management API
| Method | Endpoint | Description |
|---|---|---|
POST | /api/channels/push/register | Register a device token |
GET | /api/channels/push/devices | List registered devices |
DELETE | /api/channels/push/devices/:id | Unregister a device |
POST | /api/channels/push/test | Send a test notification |
Test a notification
Troubleshooting
Notifications not arriving on Android
Notifications not arriving on Android
Verify the service account JSON path is correct and the file is readable. Check
feral doctor for FCM connectivity status.Notifications not arriving on iOS
Notifications not arriving on iOS
Ensure you’re using the correct environment (
sandbox for dev, production for release). Confirm the bundle ID matches your app.Invalid device token errors
Invalid device token errors
Device tokens expire when the app is reinstalled or the OS rotates them. Re-register the token from the mobile app.
