Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
436 views
in Technique[技术] by (71.8m points)

android - Is it possible to use GCM without Google account AND Google Play Services on the device?

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

I want to implement push notifications.

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

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

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

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)

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)


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)

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...