打瞌睡模式下的 Android VOIP 应用程序行为

标签 android push-notification google-cloud-messaging android-networking android-6.0-marshmallow

我正在 Android 上开发旧版 VOIP 应用程序。 它现在不使用 Google Cloud Messaging 技术,而是永远保持自己的 TCP 连接。

最近 Google 推出了其 Android M 预览版 Doze mode

所以问题是:是否有任何解决方法可以让应用程序在打瞌睡模式下接收来电/消息,而无需重新设计整个系统以使用 GCM?

最佳答案

您可以使用 ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS要求用户允许电池优化忽略。但是,仔细检查 Optimizing for Doze and App Standby , 好像是 allowed only for enterprise VoIP/IM (参见问题 #33114063#31154128)

关于打瞌睡模式下的 Android VOIP 应用程序行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31604093/

相关文章:

android - 接收消息收到来自 GCM 服务的确认

android - 我如何从 Android 中的 Retrofit 中的 Header 获取 token

java - 启动应用程序时 AdMob 崩溃

android - 适用于移动应用程序的 Spring Rest API - 添加推送通知

android - 处理来自多个服务器的远程推送通知

iOS 推送通知 : how to detect if the user tapped on notification when the app is in background?

android - 更新 Android Studio 后显示错误

android - 从 JSON 响应填充 Gridview

android - 为 Google Cloud Messaging 设置服务器端

android - 无需谷歌云消息(GCM)将通知从 PC 推送到 android