android - GCM(谷歌云消息)需要谷歌账户吗?

标签 android push-notification google-cloud-messaging

我需要编写一个简单的应用程序来获取推送通知。
我使用 GCM,它使用 Google Play 服务来获取信息。

我的问题是 - 要访问 GCM,是否需要 Google 帐户?
我可以使用另一个电子邮件帐户来识别设备吗?
有没有其他方法可以获取另一个电子邮件帐户或设备的推送通知?

最佳答案

引自GCM Characteristics

It uses an existing connection for Google services. For pre-3.0 devices, this requires users to set up their Google account on their mobile devices. A Google account is not a requirement on devices running Android 4.0.4 or higher.

如果您的应用支持 3.0 之前的设备,那么,则需要 Google 帐户并且您需要将此权限添加到您的 list

<uses-permission android:name="android.permission.GET_ACCOUNTS" />

关于android - GCM(谷歌云消息)需要谷歌账户吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22605907/

相关文章:

android - 配置 gradle 以使用 JUnit、Mockito、Hamcrest 和 Espresso

android - 在 Release模式下编译期间出错

java - Java 中以数字开头,然后是点和逗号的字符串

通过服务的 Android 通知

Android PCM 字节

android - FCM 推送通知 Android 在后台接收 2 个通知

push-notification - 通知徽章编号增量

android - IntentService 完成父 Activity

ios - 我应该自己保存 firebase token 还是在注册远程通知时自动完成?

Android DOZE 模式 GCM 优先级