If you encounter issues receiving messages in your app, consider these troubleshooting items:

  1. Check the logcat for errors or warnings and make any necessary corrections.

    Ensure you attempt this important debugging step. The SDK provides very verbose messages, and you can correct many errors and issues by reviewing the logcat.

  2. getSdkState() has been added to MarketingCloudSdk which will display the current state of the SDK and the associated configuration values.

  3. You may also use the getPushToken() method on PushMessageManager to find your push_token.

  4. Use the Push Token output (push_token) in the logcat as shown above to send a message directly to your app from Google, as documented in Google Cloud Messaging (GCM) HTTP connection server.

    NOTE: Push Token and System Token are the same thing and you may see them used in the documentation or logging interchangeably.

    You will also need the Server Key found in your GCM Project that you used to provision the MobilePush app.

  5. Use this script to test your push messages. Replace the sample values as applicable. Ensure the Content-Type users application/json and the Authorization header contains the same key you used to provision the MobilePush app. Then create the body of the REST message using a simple JSON object.

    The registration ID should use the Push Token received from Google and sent to the Marketing Cloud in the Registration call, which you put into the logcat as described above.

    Keep things simple and only add the alert JSON key pair (which includes the message displayed in your notification).

  6. If you successfully receive a message using the sample script but still cannot to receive a message from the Marketing Cloud to your device, follow these steps:

    1. Wait 5 minutes after the first registration call for the device you’re testing with to ensure your device properly registered in the Marketing Cloud.

    2. Check the List you created in the Marketing Cloud and ensure the DeviceId you printed in the logcat shows up in the list.

If you implement multiple GCMs as part of your push implementation, review the Multiple Push SDKs page for additional information.