【问题标题】:How to create NotificationChannel for lower API's ( < 26 ) ?如何为较低的 API(<26)创建 NotificationChannel?
【发布时间】:2017-09-29 07:02:31
【问题描述】:

如何为较低的 API (

【问题讨论】:

    标签: android notifications android-notifications android-appcompat notification-channel


    【解决方案1】:

    不可能。 Android 操作系统不支持它。您可以使用 NotificationCompat.Builder(Context context, String channelId) 将 channelId 添加到通知中,但操作系统会在 Pre-Oreo 之前忽略它。

    我的同事在 API 15、22、23 和 26 上对其进行了测试:https://stackoverflow.com/a/45979726/1310343

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-09
      • 1970-01-01
      • 1970-01-01
      • 2018-08-01
      • 1970-01-01
      • 2022-12-22
      • 1970-01-01
      • 2019-06-22
      相关资源
      最近更新 更多