Skip to content
CodeOnAir
Docs menu

Send and schedule notifications

Write a push notification, choose who gets it, send it now or schedule it, test it on a device, and read delivery, failure and open results.

Choose Push → Notifications and click + New notification. The composer has three steps — Message, Who gets it and When — with a live iOS and Android preview beside them.

Composing a notification. The count under “Who gets it” updates as you change the audience.

1. Message#

FieldWhat to put
TitleRequired, up to 150 characters — phones show about 40–50, so lead with what matters.
MessageUp to 1,000 characters. Most people read only the first two lines.
Image (optional)An https:// URL, or Upload a PNG, JPEG, WebP or GIF under 1 MB. 2:1 (e.g. 1024 × 512) looks best on Android.
When tapped, open (optional)An AppLink (https://demoshop.codeonair.com/summer-sale), your app's scheme (demoshop://orders), a path (/orders/1042) or a web page. Empty: the app opens on its home screen.

Advanced options

OptionWhat it does
Internal nameOnly your team sees it, in the list — e.g. “Summer sale — everyone”.
Custom dataUp to 20 key–value pairs your app receives with the notification (e.g. screen = sale). Under 3 KB in total.
iOS badge numberThe number on the app icon. Empty leaves it unchanged.
Android channel IDA notification channel your app created. Empty uses the SDK's default channel.
Expire after (seconds)Phones that are off for longer don't get it. Empty: 4 weeks (the most Google and Apple keep it).
Replace keyA newer notification with the same key replaces the older one on the phone — good for live scores or order status.
Play a soundOn by default.

2. Who gets it#

Everyone means every install that allowed notifications. Choose who narrows it down — all the filters you fill in must match:

  • Platforms — iOS, Android or both.
  • Tags — labels your app gives a device (e.g. vip, hindi), matching any of these or all of these.
  • User IDs — your own user IDs, which your app sets after login. One user can have several devices; each gets it.

The line underneath shows how many devices it reaches now, split by iOS and Android, and how many more installs haven't allowed notifications yet.

3. When#

  • Send now starts within seconds.
  • Schedule sends at a date and time in your time zone, up to 90 days ahead. The audience is counted when it starts sending, so devices that join before then are included.
  • Save draft keeps it without sending.

Clicking Send now → or Schedule → asks you to confirm and shows how many devices it goes to. Drafts and scheduled notifications can be edited or cancelled until they start; a notification that's sending can be cancelled (devices that already got it keep it). Duplicate on any notification starts a new one with the same content.

Test before you send#

📱 Send a test in the composer (or Test next to a device under Devices) sends right away to one device or to every device of one user ID, and tells you what happened on each. Tests count towards your monthly sends.

Pick a device — or switch to “A user ID” — and click Send test.

Read the results#

Click a notification in the list to see how it went:

Results for one notification. Failures are grouped by reason, in plain words.
NumberMeans
TargetedDevices in the audience that could receive it when sending started.
Delivered to push serviceAccepted by Google (FCM) or Apple (APNs). The phone shows it when it's online.
FailedRefused — see the reasons below the tiles.
OpenedDevices where someone tapped it, counted once per device. Open rate = opened ÷ delivered.

Why some didn't go out

ReasonWhat it means and what to do
UNREGISTEREDAndroid: the app was uninstalled or its token expired. Nothing to do — the device sends a new token on its next launch.
UnregisterediOS: the app was uninstalled, or its notifications were reset.
SENDER_ID_MISMATCHThe app is built with a different Firebase project than the service account you uploaded.
BadDeviceTokenApple doesn't recognise the token for this app — check the bundle ID in Push → Setup.
DeviceTokenNotForTopicThe token belongs to a different bundle ID than the one in your APNs settings.
InvalidProviderTokenApple rejected the APNs key — upload it again with the right Key ID and Team ID.
NO_ANDROID_CREDENTIALS, NO_IOS_CREDENTIALS — that platform isn't set up yet in Push → Setup.
QUOTA_EXCEEDED, TIMEOUT, NETWORK_ERROR — a temporary problem at Google or Apple; send again later.

Devices#

Push → Devices lists every install of your app with the SDK, most recently seen first. Search by user ID, model, tag or device ID, and filter by platform or whether it can receive notifications.

Devices, with each install's notification status.
NotificationsMeans
OnAllowed notifications and has a push token — it can receive them.
Not asked yetThe app hasn't shown the permission prompt yet.
Turned offThe user said no (or turned notifications off in Settings).
Token expiredGoogle or Apple said the token is no longer valid; the device sends a new one on its next launch.

Remove (admins) deletes a device; it's added again the next time the app opens.

The app SDK is coming soon

Devices appear in CodeOnAir once your app runs the CodeOnAir push SDK for React Native, @codeonair/push-react-native, which registers the install, asks for notification permission, reports opens and draws in-app messages. It isn't released yet — we'll publish its setup guide here when it is. You can already connect Firebase and APNs, design messages and wire up your server.

Stuck? Write to support@codeonair.com with your App ID and what you tried — we reply within a working day.