当3G网络可用时,android GCM不能与wifi netowrks一起使用 [英] android GCM doesn't work with wifi netowrks when 3G network is available

查看:170
本文介绍了当3G网络可用时,android GCM不能与wifi netowrks一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发android GCM推送通知应用程序。一切工作正常。但是当我的设备使用wifi而不是服务提供商的数据计划时,我无法获得通知消息。在我的情况下,数据计划是3G并通知到平时的设备,但通过WiFi连接设备时,我无法得到任何通知。



是否有人解决了这个荒谬的问题。



在我的用户社区面临问题时期待帮助。

解决方案

不应该是这样,我有一个Android应用程序,无论它通过3G或Wi-Fi连接,接收GCM推送通知。



我会建议排除此问题:


  • 当您从服务器发送推送通知时,请确保包含 delay_while_idle ,所以通知立即传送。此外,请确保您已将 time_to_live 设置为合理的值(默认值为4周)。 尝试持有Wi-Fi锁定您的应用程序

  • 使用不同的设备和/或Android版本进行测试(可能是某些硬件/ API版本存在问题)

    I am developing app on android GCM push notification.Everything works fine .But i am not able to get the notification message when my device is on wifi rather than on data plan of service provider.In my case data plan is 3G but and notification comes as usual to devices but when device is connected through wifi i am not able to get any notifications.

    Do any one have solved this ridiculous issue .

    Expecting help asap as my user community is facing problems.

    解决方案

    Well this should not be the case, I have an android app that receives GCM push notifications regardless it is connected via 3G or Wi-Fi.

    What I would suggest to troubleshoot this problem:

    • When you send the push notification from the server make sure to NOT include delay_while_idle, so the notification get delivered right away. Also make sure you have set time_to_live to a reasonable value (default is 4 weeks)
    • Try to hold a Wi-Fi lock in your app
    • Test with different device and/or Android version (maybe it is a problem with certain hardware/API version)

    这篇关于当3G网络可用时,android GCM不能与wifi netowrks一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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