是否有可能使用GCM没有谷歌帐户和谷歌播放服务在设备上?有可能、帐户、设备、GCM

2023-09-06 04:52:30 作者:Swing -]

我写的,有设备的系统应用 没有谷歌播放服务,也没有谷歌播放装商店。

I'm writing a system app for a device that has no Google Play Services nor Google Play Store installed.

我想实现推送通知。

该设备运行的是Android 4.2.2和谷歌官方GCM文档说:

The device is running Android 4.2.2 and official Google GCM docs say:

一个谷歌帐户不是在运行Android 4.0.4或设备的要求较高。

A Google account is not a requirement on devices running Android 4.0.4 or higher.

但这些文档都涉及到GCM的新版本,它使用谷歌播放服务(对我来说不是一个选项的)

But these docs are related to the new version of GCM which uses Google Play Services (not an option for me)

所以我试图用旧的,德precated GCM助手库。 我安装了 GoogleServicesFramework4.0.x 在设备上(的我可以安装GSF。但不是谷歌播放服务的)

So I tried using the old, deprecated GCM helper library. I installed GoogleServicesFramework4.0.x on the device (I can install GSF. but not Google Play Services)

我现在得到了 AUTHENTICATION_FAILED 错误和registrationId是。 我猜这是因为没有谷歌帐户设置在设备上。 是否pcated GCM库去$ P $要求谷歌帐户? (我SENDER_ID是正确的,我已经检查过)

I am now getting the AUTHENTICATION_FAILED error and registrationId is null. I am guessing this is because no Google account is set up on the device. Does the deprecated GCM library require Google account? (My SENDER_ID is correct, I already checked that)

基本上,我的问题是: 是否有可能使GCM工作的不谷歌帐户, 使用旧,德precated GCM帮助库?

Basically, my question is: Is it possible to make GCM work without Google account, using the old, deprecated GCM helper library?

注意:我不能在设备上创建谷歌帐户(这是一个要求)

NOTE: I mustn't create Google account on the device (this is a requirement)

如果这是不可能的,那么请建议实施推送通知的另一种方式。 (注意,大多数的推送通知供应商实际使用GCM(城市Airpush,例如)引擎盖下,所以不建议那些)的

If this is not possible, then please suggest another way of implementing push notifications. (Note that most of the push notifications providers actually use GCM "under the hood" (Urban Airpush, for example), so don't suggest those)

我想避免轮询服务器的通知(拉通知),如果可能的话, 谢谢你。

I would like to avoid having to poll server for notifications ("pull notifications") if possible, thank you.

推荐答案

之前,为了您发布(关于谷歌帐户不被要求)的报价,你有这样的:

Just prior to the quote you posted (about Google account not being required), you have this :

它需要运行Android 2.2或更高版本的也有谷歌播放安装Store应用程序或或仿真器上运行的Andr​​oid 2.2与谷歌API的设备。但是,不限于通过谷歌Play商店的部署Android应用程序。

10项你可能从未听过的Google服务

It requires devices running Android 2.2 or higher that also have the Google Play Store application installed, or or an emulator running Android 2.2 with Google APIs. However, you are not limited to deploying your Android applications through Google Play Store.

因此​​,似乎谷歌Play商店是必须的GCM工作。

Therefore it seems Google Play Store is a must for GCM to work.

我不能帮你的替代GCM。

I can't help you with an alternative to GCM.