Progress will discontinue Telerik Platform on May 10th, 2018. Learn more

Android: Common Reasons for Failing Push Notifications

Android: Common Reasons for Failing Push Notifications

There are many possible reasons why your Android users are not receiving push notifications. This article lists the most common of them.

Q: What does the "Error authenticating to Google Cloud Messaging server" failure message mean?

A: The vendor API key might not be configured properly.

See the following possible causes:

Q: What does the "MismatchSenderId" failure message mean?

A: Google Cloud Messaging responds that the device push token is invalid.

See Possible cause: Device is marked as inactive in the backend

Possible cause: Your Google API project number is not set

Detailed description

The Google API project number (or sender ID) is a 12-character number that you receive when you register a Google API project. You need to set this number in your code if you want to integrate push notifications.

You need to specify the Google API project number in your app to be able to send push notifications to your Android users. Note that the Google API project number must always be passed as a string.

Possible cause: Your Google API project number is not valid

Detailed description

The Google API project number (or Sender ID) is a 12-character number that you receive when you register a Google API project. It can be invalidated if you delete the project or for other reasons.

Log in to your Google Developers Console and check the state of the project.

Possible cause: Your Google API key is not configured properly in the Google API Console

Detailed Description

The API key that you entered in Telerik Platform might not be the required one or might not be configured properly in the Google API console. Ensure that you have created a Server key credential in the Google API console and entered it as Google API Key in your Telerik Platform app notifications settings.

Possible cause: Your Google API key is not set

Detailed description

The Google API Key is a 39-character string that gives the Telerik Platform servers authorized access to Google Cloud Messaging (GCM) for Android for the purpose of sending push notifications on your behalf.

Take these steps to set your Google API Key:

  1. Obtain your Google API Key as explained in this Google article https://firebase.google.com/docs/cloud-messaging/android/client.
  2. Enter your Google API Key in the Telerik Platform portal. Go to Notifications > Push Notifications > Settings, click the Android box and enter your Google API Key.

Possible cause: GCM is not enabled

Detailed Description

Google Cloud Messaging (GCM) is the Google service that Telerik Platform contacts to to sent push notifications.

To enable the Google Cloud Messaging service, take these steps:

  1. Log in to the Google Developers Console.
  2. Select you project.
  3. In the left-hand navigation select APIs & auth → APIs.
  4. In the list of APIs, find Google Cloud Messaging for Android and click it.
  5. On the page that opens, click the Enable API button.

Possible cause: Device is not registered in the backend

Detailed Description

In addition to registering a device with Google Cloud Messaging (GCM) for Android, you need to register it with Telerik Platform as well.

To understand the concept of sending push notifications through Telerik Platform, see Introduction to Push Notifications.

To learn how to register a device, see Initializing and Registering a Device.

Possible cause: Device is marked as inactive in the backend

Detailed description

A device will be marked as "active: false" when its token is returned as invalid after sending a push notification to it. This could happen if the push token for the device is not valid.

You can resolve some of the cases by taking these steps:

  • Check the Google Developers Console project number (SenderId) in the client app
  • Verify that the Google API Key registered in your Telerik Platform app corresponds to the right Google Developers Console project
  • Unregister and then reregister the device

Possible cause: You are not targeting the correct platform

Detailed description

Telerik Platform allows you to send a push notification to multiple platforms.

  • When using the portal to send a push notification: Ensure that you selected either Broadcast or Platform Specific: Android.
  • When sending a push notification programmatically: Ensure that you have included a dedicated section for Android or at least the default-sink Message value. See Push Notification Object Field Reference for details.

See Also

Introduction to Push Notifications


Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.