RegistrationID cannot be obtained from GCM.

Asked 2 years ago, Updated 2 years ago, 95 views

I am an Android developer.
In the application currently being developed,
There are several terminals that cannot get RegistrationID from GCM when delivering push notifications.

After conducting an internal survey,

located in the google-play-service.jar library com.Google.android.gms.gcm.GoogleCloudMessagin class
The register method assumes that an Exception has occurred.
Google-play-service.jar version is 8.1.15

Also, to determine the cause above, when we create a debug application for the terminal where the event is occurring, an exception occurs on lines 64-65 of the URL source below.

Source
https://github.com/google/gcm/blob/399e88c1ef5bb95395b6392f9061e45b2fb5d49a/samples/android/gcm-demo/src/main/java/com/google/android/gcm/demo/logic/InstanceIdHelper.java#L55-L98

Please let me know the cause of this incident.

android java gcm

2022-09-29 21:46

1 Answers

This may be because some devices cannot do it.

<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
Android 4.0.4 and earlier (not including 4.0.4) require the above permissions.
No further required, including 4.0.4.


2022-09-29 21:46

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.