简体   繁体   English

推送通知不会弹出

[英]Push Notification dont pop up

I created an Android App with Android Studio. 我使用Android Studio创建了一个Android应用。 Now I want to do push notifications with Google Firebase. 现在,我想使用Google Firebase进行推送通知。

I have everything set up. 我已经准备好一切。

Everything is working well. 一切都很好。

This is the problem: 这就是问题:

When I send a cloud message to my device as a test, it works. 当我向设备发送云消息作为测试时,它可以工作。 However, when I send a cloud message normally, not as a test, nothing happened. 但是,当我正常发送云消息而不是进行测试时,什么也没发生。

It does work with Android Studio. 它确实适用于Android Studio。

It makes no difference if the app is open or closed. 应用程序是打开还是关闭都没有关系。

Why does it not work? 为什么不起作用?

If use Android upper Oreo. 如果使用Android上的Oreo。 Need setup channel id and configurate him (sound, priority) https://developer.android.com/training/notify-user/channels 需要设置频道ID并配置他(声音,优先级) https://developer.android.com/training/notify-user/channels

and after in firebase message add channel id. 然后在Firebase消息中添加频道ID。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM