我知道如何在 Android 应用中创建通知和通知 channel 。
我展示了许多示例,说明在您从 FCM 监听器生成通知时创建通知 channel 。因此,当应用在此时收到通知时,它会生成 channel 。
但我在很多应用中看到,它创建所有 channel 时都没有收到任何通知。
问题:我们应该从哪里创建通知 channel ?
最佳答案
来自 the docs :
Creating an existing notification channel with its original values performs no operation, so it's safe to call this code when starting an app.
关于Android:创建通知 channel 的正确位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53391300/