Early access · launching soon. Request access

Early access

Early access · launching soon
Product
IntelligenceEarly access. Designed and in development. No results yet. See what's left on the roadmap.
Developers
Resources
Request access

A person reads every request.

In your appEarly accessDesigned and in development. No results yet. See what's left on the roadmap.

Android notification channels: sounds and importance

Oricato Team Last updated SDK 1.0.1

Early access · launching soon.

On Android 8.0 (API 26) and later, every notification belongs to a notification channel. The channel decides the sound, vibration, importance (whether it pops up or arrives quietly), the notification light, the app icon badge and what shows on the lock screen. People can also switch each channel on or off, or change its sound, in the system settings.

With Oricato you define channels in the dashboard, not in your app code. The Android SDK (and the Flutter SDK on Android) reads them from your project’s config and creates them on each device. This guide shows how to add a custom sound, create channels, choose one per message, and change a sound later without surprises.

How it works

  1. You create, edit or delete a channel on the Channels page of your project. Every change bumps the project’s config_version.

  2. The SDK receives the config in the response to its registration call. When the config_version differs from the one it applied last, it creates or updates every channel in android.channels and deletes every ID in android.deleted_channel_ids.

  3. When a notification arrives, the Android SDK posts it to a channel in this order:

    • the message’s channel (fx_channel), if it exists on the device (if not, the SDK tries to create it from the cached config);
    • otherwise the project’s default channel;
    • otherwise the SDK’s built-in fallback channel fx_default (“Notifications”, importance high).

    Flutter SDK on Android: the order is shorter. The Flutter SDK uses the message’s channel (or re-creates it from the cached config), and if that fails it falls straight back to the built-in “Notifications” channel (fx_default). It does not try the project’s default channel on the device.

  4. Below Android 8.0 there are no channels. The SDK still posts the notification and the channel ID is ignored.

The server resolves the channel the same way before it sends: the message’s channel if it is live in the project, else the project’s default channel, else fx_default.

A device picks up channel changes the next time the app registers with Oricato: on a cold start or when the app comes to the foreground and the last successful registration is at least one hour old, or sooner when something in the installation changed (for example the FCM token, the permission or the language). A fresh install gets the current channels on its first registration. The SDK also refreshes the config when the cached copy is older than the project’s refresh_interval_hours (24 hours by default).

Learned in real integrations: Android fixes a channel once it exists on a device.

Android keeps a channel’s sound, vibration and importance from the moment the channel is first created on a device. Editing them in the dashboard later only affects new installs and devices that never received the channel. The name and description still update everywhere.

To change the sound or vibration for everyone, create a new channel ID (for example reminders_v2), point your messages at it, and optionally delete the old channel so devices remove it. Do not reuse a deleted ID to change a sound: when an app re-creates a channel ID that it deleted, Android restores the settings that channel had before. Restoring a deleted channel in the dashboard re-creates the same ID, so it brings the old on-device settings back. That is fine for undoing a mistake, but not for changing a sound.

People can also change the importance and sound of any channel themselves in system settings, and Android always keeps their choice.

Prerequisites

  • An Oricato project with Android in its platforms, and the Oricato SDK 1.0.1 integrated in your app (Android quickstart or Flutter quickstart). Channels are an Android feature; a project that targets only iOS has no Channels page.
  • The admin or owner role in your Oricato team. Roles are account-wide and apply to every project. Viewers and editors can see channels but not change them.
  • A test device or emulator running Android 8.0 (API 26) or later.
  • For a custom sound: the sound file, and an app release you can ship before the channel goes live.

Steps

1. Add the sound to your app and keep it from shrinking

Skip this step if the channel uses the phone’s default sound or no sound.

  1. Put the sound file in your app’s raw resources. Resource names must be lowercase letters, digits and underscores and start with a letter.
    • Android app: app/src/main/res/raw/chime.mp3
    • Flutter app: android/app/src/main/res/raw/chime.mp3
  2. The server refers to the sound by name, which R8 resource shrinking cannot see. Add res/raw/oricato_keep.xml next to the sound (in a Flutter app, under android/app/src/main/res/raw/):
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
    tools:keep="@drawable/ic_stat_*,@raw/*" />
  1. Ship this app version and let it reach your users before you create a channel that uses the sound.

The sound name you enter in the dashboard is the raw resource name without the extension: res/raw/chime.mp3 becomes chime.

Learned in real integrations: a missing sound means no channel.

Because Android fixes a channel’s sound when the channel is created, the SDK never creates a channel whose sound file is missing from the app. It logs an error instead, and notifications meant for that channel fall back: with the Android SDK to the project’s default channel, with the Flutter SDK to the built-in “Notifications” channel (fx_default). Devices running an older app version without the file simply skip the channel until they update.

2. Create the channel in the dashboard

  1. Open your project and select Channels in the sidebar.
  2. Select New channel.
  3. Fill in the fields:
    • Channel ID: a stable identifier such as reminders or news. Use letters, digits, _, . or - (1 to 64 characters). fx_default is reserved. The ID cannot be changed after you create the channel.
    • Name: what people see in Android settings, for example “Reminders” (1 to 40 characters).
    • Description: optional, up to 300 characters, also shown in Android settings.
    • Importance: High (makes a sound and pops up, the default), Default (makes a sound), Low (no sound) or Min (no sound, folded away).
    • Sound: Default (the phone’s notification sound), Silent (no sound, even for High importance) or App sound with the Sound file name, for example chime.
    • Behaviour: Vibration (on by default), Light, and App icon badge (on by default). When you turn on Light, the dashboard picks a color automatically (#E8622C); you can change it under Light colour to one of 12 preset swatches, such as #159CB7. The admin API accepts any #RRGGBB color.
    • Lock screen: Show everything, Hide content or Hide completely.
    • Group: optional. Set both a Group ID (for example updates) and a Group name (for example “Updates”), or neither. Android shows grouped channels together in settings.
  4. Select Create channel. The dashboard confirms that phones add the channel at their next sync.

If you manage channels from your own tooling, the same fields are available on the admin API (POST /admin/v1/projects/{project_id}/channels). A channel with every field set looks like this:

{
  "channel_id": "reminders",
  "name": "Reminders",
  "description": "Reminders you set in Lingora",
  "importance": "high",
  "sound": "chime",
  "vibration": true,
  "lights": false,
  "light_color": null,
  "show_badge": true,
  "lockscreen_visibility": "public",
  "group_id": "updates",
  "group_name": "Updates",
  "is_default": false
}

Allowed values: importance is min, low, default or high (default high); sound is default, none or a raw resource name (default default); lockscreen_visibility is public, private or secret (default public). Creating an ID that already exists returns 409 conflict.

3. Set a default channel

Messages that do not pick a channel use the project’s default channel. Without one, they use the SDK’s built-in “Notifications” channel (fx_default).

  1. Open the channel you want as the default, for example news.
  2. Turn on Make this the default channel and save. Only one channel can be the default; setting a new one clears the previous default.

Deleting the default channel clears the default.

4. Pick the channel for a message

In the dashboard composer: open Options, then the Android group, and choose the Channel. Leave it on Default channel to use the project default. The channel sets the sound and how loudly the notification shows.

With the REST API: set android.channel_id in POST /api/v1/messages. The channel must exist in your project.

curl -X POST https://api.oricato.com/api/v1/messages \
  -H "Authorization: Bearer $ORICATO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Weekly reminder",
    "content": {
      "default_language": "en",
      "translations": [
        { "language": "en", "title": "Your weekly reminder", "body": "Open Lingora to review this week." }
      ]
    },
    "platforms": ["android"],
    "android": { "channel_id": "reminders" },
    "audience": { "test_only": true }
  }'

"audience": { "test_only": true } sends only to your test devices. Remove it to send to everyone.

With the OneSignal-compatible endpoint: android_channel_id in POST /api/v1/notifications maps to the Oricato channel ID.

{
  "app_id": "<ORICATO_PROJECT_ID>",
  "included_segments": ["Test Users"],
  "headings": { "en": "Your weekly reminder" },
  "contents": { "en": "Open Lingora to review this week." },
  "android_channel_id": "reminders"
}

Learned in real integrations: the channel must also exist in your project’s channel list.

Oricato only sends to channels it knows about, so a channel your app creates itself is not enough.

Where Channel ID not in the project Channel deleted in the project
REST android.channel_id Rejected with 400 validation_failed (field android.channel_id, code not_found) Accepted with the warning channel_deleted; the default channel is used
OneSignal-compatible android_channel_id Ignored with the warning android_channel_id '<id>' does not exist in this app and was ignored; the default channel is used Treated like an unknown ID: ignored with the same warning; the default channel is used

The dashboard composer only lists your project’s channels, so you cannot pick an unknown ID there.

When you migrate from OneSignal, recreate the channels you use in the Oricato dashboard first.

5. Change a channel’s sound or vibration later

Because Android fixes these settings on devices that already have the channel:

  1. If the new sound is a new file, add it to res/raw/ and ship that app release first (step 1).
  2. Create a new channel with a new ID, for example reminders_v2, and the new sound or vibration.
  3. Make it the default if the old one was, and point new messages (composer, REST and any automations) at it.
  4. Optionally delete the old channel. Devices remove it at their next sync, and messages that still reference it fall back to the default channel.

Verify it works

  1. Install the app on an Android 8.0+ test device, open it, and keep it in the foreground for a few seconds so it registers and syncs the config. A fresh install always gets the current channels.
  2. Open Settings → Apps → Lingora → Notifications (the path varies slightly by manufacturer). Your channels appear by name, for example “Reminders” and “News”, grouped under “Updates” if you set a group.
  3. In the dashboard composer, pick the channel, select Send test and send to your device. The notification uses the channel’s sound and importance. Long-press the notification to see which channel it came from.
  4. Optional: turn on debug logging and filter logcat by the tag Oricato.
import com.oricato.push.Oricato
import com.oricato.push.OricatoLogLevel

Oricato.setLogLevel(OricatoLogLevel.DEBUG) // logcat tag "Oricato"
import 'package:oricato_push/oricato_push.dart';

await Oricato.setLogLevel(OricatoLogLevel.debug);

With the Android SDK, after a sync you see Applied SDK config version N, where N is the project’s current config version. The Flutter SDK does not log a line for a successful sync; it only logs channels that failed (see below).

Troubleshooting

The channel is missing on the device.

  • The sound file is missing from the installed app version. Logcat (tag Oricato) shows:

    • Android SDK: Channel 'reminders' not created: sound res/raw/chime is missing
    • Flutter SDK: Channel reminders not created: sound_missing and Channel "reminders" was not created (sound_missing); its messages use the default channel

    Add the file and oricato_keep.xml, then ship a release. Check that the dashboard sound name has no extension and matches the file name exactly.

  • The app has not synced since the change. Bring it to the foreground; if it registered in the last hour, the change arrives on a later foreground (or reinstall the app on a test device).

  • The device runs Android 7.1 or earlier. Channels do not exist there; notifications still show.

Why didn’t my channel sound change?

Android fixed those settings when the channel was first created on the device, and people may have changed them too. Create a new channel ID as in step 5. Uninstalling and reinstalling the app also resets channels on a single test device.

Notifications arrive silently or without a pop-up on some phones.

Some manufacturer skins demote notifications to silent. TECNO devices running HiOS are one example we have seen. On the device, open Settings → Apps → Lingora → Notifications, open the channel and check its importance, sound and pop-up settings. Battery or “smart notification” managers can also change these. The person (or you, on a test device) must change them there; your app and Oricato cannot override them.

No notification at all for one channel.

The channel, or its group, is switched off in system settings. Other channels keep working. The Android SDK does not post to a blocked channel and logs Channel 'reminders' is switched off; notification <id> is not shown (at INFO level). With the Flutter SDK there is no such log line; Android itself suppresses the notification. Turn the channel back on under Settings → Apps → Lingora → Notifications.

The API returns 400 validation_failed with field android.channel_id, code not_found.

The channel ID is not in your project. Create it on the Channels page, or check the spelling (IDs are case-sensitive). To undo a deletion, open the Channels page, turn on Show deleted and restore it. Restoring brings back the same ID, so devices keep the channel’s old sound and vibration; to change those, create a new ID.

For anything else, see Troubleshooting delivery.

Related

Get early access to Oricato.

Founding teams get early access, free help moving from OneSignal, and a founding discount.

We use this to reply, plan your invitation and set up your account. Privacy Policy

A person reads every request.

Or get the monthly newsletter