0
votes

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.

1

1 Answers

1
votes

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