有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java处理没有GCM的设备

我是安卓编程新手。我的应用程序运行来自GCM的推送通知。我正在多个设备上测试它。在我拥有的一台平板电脑上,它抛出了一个异常设备没有com包。谷歌。安卓gsf现在我知道如何在安卓 emulator上解决这个问题,因为它发布在here

我的问题是,作为一名应用程序开发人员,如果使用该应用程序的人没有com,我该如何处理这个问题。谷歌。安卓gsf?这到底意味着什么?他们是否必须在手机中设置谷歌账户?那么所有使用雅虎或hotmail的人呢


共 (1) 个答案

  1. # 1 楼答案

    在4.0.4之前的Android版本上,GCM注册必须使用谷歌账户。现在已经不是这样了

    如果你的应用程序使用Google Play服务注册到GCM,无论Android版本如何,你都不再需要Google帐户。如果您使用的是旧客户端库(其中包含gcmregistar类),那么您仍然需要一个Google帐户

    下面是一位谷歌开发者写的(摘自here):

    Some background: Froyo and Gingerbread registration is implemented in GoogleServicesFramework, using the Google account for registration. This has resulted in a lot of auth errors for people where the account was not in a good state.

    Starting with ICS, GCM doesn't depend or uses the Google account - you can use it before you add an account or without any accounts.

    The "Play Services" update is implementing the new scheme on all devices - but it seems a small number of devices have problems with this, we're investigating - but the numbers are far lower than those with the old scheme.

    If you want to use the code in GSF, for Froyo and Gingerbread - you need to use the previous library, which sets package name explicitly. The new library in GCM is using the new registration code.

    The actual connection to google is following the same path - we're gradually (and slowly) moving devices to the new code in play services.