If an Android app targets API Level 26 or higher, notifications will fail to be posted to the status bar on Android 8.0 or higher unless they're assigned a notification channel as documented here...
We should modify notifications to auto-assign them the default notification channel if a channel was not already assigned by the developer. This way, when we modify Titanium to auto-target API Level 26 in the future (see ticket:
TIMOB-25852), notifications will still work. Avoids a breaking change.
Note that if the app targets API Level 25 or lower, Android 8 will auto-assign the notification the default channel for us.
- Set up "tiapp.xml" to target API Level 26 as shown below.
- Build and run the below code on an Android 8 device.
- Tap on the "Send Notification" button.
- Verify that the notification was posted to the status bar.
This should be implemented similar to the following "aps_sdk" library's PR here...
This is not an issue with our "ti.cloudpush" module. It already assigns a default channel to the received push notification.