Android 上未显示推送通知
Push Notification not displayed on Android
我在 Android 上让推送通知正常工作时遇到问题。
基本系统运行良好,通知已发送和接收。我的测试设备播放声音并在屏幕顶部的状态栏中显示应用程序图标,我可以通过向下滑动来查看通知。
但是没有显示弹窗!
我需要做什么才能完成这项工作?
此弹出窗口名为 "heads-up notification" and you will get it only for Notification
s posted on Channel
with importance set to IMPORTANCE_HIGH
(or high priority Notification
itself on lower OS versions), according to DOCs
Example conditions that might trigger heads-up notifications include
the following:
- The user's activity is in fullscreen mode (the app uses fullScreenIntent).
- The notification has high priority and uses ringtones or vibrations on devices running Android 7.1 (API level 25) and lower.
- The notification channel has high importance on devices running Android 8.0 (API level 26) and higher.
使用通知的优先级和重要性高,具体如下:Heads-up
我在 Android 上让推送通知正常工作时遇到问题。
基本系统运行良好,通知已发送和接收。我的测试设备播放声音并在屏幕顶部的状态栏中显示应用程序图标,我可以通过向下滑动来查看通知。
但是没有显示弹窗!
我需要做什么才能完成这项工作?
此弹出窗口名为 "heads-up notification" and you will get it only for Notification
s posted on Channel
with importance set to IMPORTANCE_HIGH
(or high priority Notification
itself on lower OS versions), according to DOCs
Example conditions that might trigger heads-up notifications include the following:
- The user's activity is in fullscreen mode (the app uses fullScreenIntent).
- The notification has high priority and uses ringtones or vibrations on devices running Android 7.1 (API level 25) and lower.
- The notification channel has high importance on devices running Android 8.0 (API level 26) and higher.
使用通知的优先级和重要性高,具体如下:Heads-up