Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2385] Android: Ti.Cloud support for Oreo NotificationChannels

GitHub Issuen/a
TypeImprovement
PriorityCritical
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsCloud
Labelsandroid, push, ti.cloud
ReporterMichael Gangolf
AssigneeUnknown
Created2017-12-29T11:43:45.000+0000
Updated2019-01-29T16:59:39.000+0000

Description

*Problem* When you target Android 8.0 (API level 26), you must implement one or more notification channels to display notifications to your users. With the current Ti.Cloud you'll see a Toast notification that the NotificationChannel is null: https://i.stack.imgur.com/JCS2e.jpg *Solution:* https://stackoverflow.com/a/47135605/5193915 https://stackoverflow.com/a/47974065/5193915 *More infos* https://medium.com/exploring-android/exploring-android-o-notification-channels-94cd274f604c *Platform* Titanium SDK 7.0.1 Ti.Cloud 3.2.11 Android Oreo

Comments

  1. Sharif AbuDarda 2017-12-30

    Hello, Thanks for the Ticket, Our engineers will look into it.
  2. Paul Ryan 2018-03-14

    I find that if you do something like this in your app if (OS_ANDROID) { var apiLevel = parseInt(Ti.Platform.Android.API_LEVEL, 10); if (apiLevel > 25) { var channel = Ti.Android.NotificationManager.createNotificationChannel({ id: 'channel_name', name: 'All Users', importance: Ti.Android.IMPORTANCE_DEFAULT }); } } you can send a push to it via GCM using a payload like data: { payload: { android: { alert: "test", title: "test", channelId: "channel_name" } } } but I cannot do this via the app dashboard in ACS, the app throws an error "no valid small icon"

JSON Source