Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

Notification Channel / Category in Android 8.0
Started by yosu Jan 14 2019 05:41 PM

2 replies to this topic
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Contributor

  • 523 posts
  • Corona SDK

Hi guys,


This new feature in Android 8.0 (API level 26) where notification can be handled as channels (aka category). Currently, in the app, the 'category' is corona (see attached screen shot).


I have tried sending a notification message (using FCM) with the 'android_channel_id' field, but it does not show. I think the push notification plugins needs to be updated or maybe the app needs to create the category first (as per FCM's document).

The app must create a channel with this channel ID before any notification with this channel ID is received.
If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.
// Sample post-data to FCM
$postData = [
  'registration_ids' => $listOfFcmIds,
  'data' => [
             'alert'=> 'Notification Message',
             'custom' => $myData,



Reference documents :






Any advice on how to create the channels/category in the app using Corona ?





[TOPIC: post.html]

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,212 posts
  • Enterprise

I'm checking with Engineering about this.

[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Contributor

  • 890 posts
  • Corona Staff

This field is optional, please skip it.


For local notifications Corona uses channel with id "com.coronalabs.defaultChannel" and tag "corona", created when first local notification is posted.


If you want to mass-send notifications consider using topics subscriptions with notifications.subscribe/unsubscribe functions.