奥利奥的打盹模式 [英] Doze mode on Oreo

查看:212
本文介绍了奥利奥的打盹模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用程序中遇到有关打盹模式的问题。我正在制作聊天应用程序,当应用程序在打盹模式下处于背景状态并接收任何消息时。设备不会在orea中显示通知。

I am facing issue in my app regarding doze mode. I am making a chat application and when app is in backgroud during doze mode and receive any message . Device does not show notification in orea.

我已通过为其构建频道来遵循正确的OREO通知程序。

I have followed the proper procedure for OREO notification by building channel for it.

我需要找到是否有办法从打盹模式whiteList我的应用程序,以便我可以收到通知。或者任何其他优化通知构建的过程。

I need to find if there is a way to whiteList my app from doze mode so that I can have notifications. Or any other process to optimize notification building.

推荐答案

我不需要将我的应用程序列入白名单以在打盹模式下收到通知。我建议您查看通知,看看是否可以在那里找到问题。

I do not need to whitelist my application to get notifications in doze mode. I recommend to look at your notification to see if you can find the issue there.

一些提示:


  1. 发送通知,使用通知字段。如果没有通知字段,则将其作为数据通知处理。应用程序重新启动时会传递数据通知。

  2. 将优先级设置为高。

  3. 也许使用生存时间= 0.这将使firebase更加努力地将其交付。但如果它失败将会丢失。

当我不知道你从哪里发送通知时,很难给你更直接的建议。

Hard to give you more direct advice when I do not know where you are sending the notification from.

https:// firebase。 google.com/docs/reference/fcm/rest/v1/projects.messages

这篇关于奥利奥的打盹模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆