Set the importance on Android notifications

43 views
Skip to first unread message

Carlos Verdier

unread,
May 15, 2020, 1:19:00 PM5/15/20
to CodenameOne Discussions
Hi

Is this feature exposed on cn1?

Right now all notifications are set as low importance, so no sound unless the users change that on their device settings.

Would be nice to be able to set that both on regular and local notifications.

Shai Almog

unread,
May 16, 2020, 1:21:52 AM5/16/20
to CodenameOne Discussions
Hi,
we have the following build hints:

android.NotificationChannel.id the current default is cn1-channel
android.NotificationChannel.name
android.NotificationChannel.description
android.NotificationChannel.importance - this is a numeric value and defaults to 2 which is low
android.NotificationChannel.enableLights
android.NotificationChannel.lightColor
android.NotificationChannel.enableVibration
android.NotificationChannel.vibrationPattern

Unfortunately it seems that all of this isn't documented. Feel free to file an issue on documenting this behavior.

Carlos Verdier

unread,
May 16, 2020, 1:08:27 PM5/16/20
to CodenameOne Discussions
Great, thank you
Reply all
Reply to author
Forward
0 new messages