0

I've deployed an Android application on a real device using IBM Worklight. I've enabled the push notifications and all works on the Android emulator, but on the real device I see this popup:

Failed registering for push notifications. The application will not be able to receive notifications.

And in LogCat, this message:

Push notification will not work, because register/unregister to GCM service returned error AUTHENTICATION_ERROR

On the android device the same gmail account of the senderId is syncronized.

My Environment:

  • Worklight Studio 5.0.6
  • Eclipse Java EE IDE for Web Developers. Version: Juno Service Release 1 Build id: 20120920-0800
  • Windows7
  • Android 2.3

I've checked the behavior with:

  • Android 4.2 Smartphone
  • Android 4.1 Smartphone
  • Android 3.1 Tablet
  • Android 2.3 Smartphone

I'm not able to subscribe the application for push notifications only with the 2.3 Android version.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
brillantef
  • 134
  • 8

1 Answers1

1

Push Notifications in Worklight with the Android environments are supported starting Android OS 2.2 and above (2.2.x, 2.3.x and 4.x.x. Worklight does not support Android OS 3, but it should work there with Worklight none the less).

From another SO question: HTTP Status Code: 401 in GCMDemo

Authentication Error
The sender account that you're trying to use to send a message couldn't be authenticated. Possible causes are:

Authorization header missing or with invalid syntax.

Invalid project number sent as key.

Key valid but with GCM service disabled.

Request originated from a server not whitelisted in the Server Key IPs.

I would re-validate all required settings, in this case: Gmail address and password in the device, and senderId and Key in application-descriptor.xml

Community
  • 1
  • 1
Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • I've checked all required settings regarding GMC and the Gmail account in the device, but the issue persist. Then i've deployed the application on a newer device with Android 4.1 and the push notifications work correctly. I know that the push notifications are supported from Android 2.2, so should works also with a 2.3 version, but i don't know what could be the problem. I'm still receiving on the device the message: 'Failed registering for push notifications. The application will not be able to receive notifications' – brillantef Jun 17 '13 at 16:58
  • I have tried with an Android 2.3 device, but right now I'm getting: "Push notification will not work, because register/unregister to GCM service returned error SERVICE_NOT_AVAILABLE.", so I will have to try at a later time... – Idan Adar Jun 18 '13 at 12:41