protected boolean notifyNotificationWithChannel(String platformTag, int platformId,
            Notification notification, String channelName) {
        ensureOnCreateCalled();

        if (!NotificationManagerCompat.from(this).areNotificationsEnabled()) return false;

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            String channelId = channelNameToId(channelName);
            // Create the notification channel, (no-op if already created).
            mNotificationManager.createNotificationChannel(new NotificationChannel(channelId,
                    channelName, NotificationManager.IMPORTANCE_DEFAULT));

            // Check that the channel is enabled.
            if (mNotificationManager.getNotificationChannel(channelId).getImportance() ==
                    NotificationManager.IMPORTANCE_NONE) {
                return false;
            }

            // Set our notification to have that channel.
            Notification.Builder builder = Notification.Builder.recoverBuilder(this, notification);
            builder.setChannelId(channelId);
            notification = builder.build();
        }

        mNotificationManager.notify(platformTag, platformId, notification);
        return true;
    }
Displays a notification.
@param platformTag The notification tag, see
                   {@link NotificationManager#notify(String, int, Notification)}.
@param platformId The notification id, see
                  {@link NotificationManager#notify(String, int, Notification)}.
@param notification The notification to be displayed, constructed by the provider.
@param channelName The name of the notification channel that the notification should be
                   displayed on. This method gets or creates a channel from the name and
                   modifies the notification to use that channel.
@return Whether the notification was successfully displayed (the channel/app may be blocked
        by the user).
customtabs/src/android/support/customtabs/trusted/TrustedWebActivityService.java