Troubleshoot Push Messages Not Displayed on Android

If you encounter issues receiving messages in an app that uses the Salesforce Engagement SDK, consider these troubleshooting steps.

  1. Enable logging in the SDK.

  2. Check the log for errors.

    The SDK provides verbose messages that are helpful in identifying and rectifying errors.

  3. To capture the log output from the SDK, add the MCLogListener interface.

  4. Implement a custom log listener.

To test whether your device can receive a push directly from FCM, follow these steps.

  1. Get the push token from the SDK.

    View code example for SDK version 8
    View code example for SDK version 7
  2. Use this script to send yourself a push message.

If your device successfully receives a message using the sample script but still can’t receive a message from Marketing Cloud Engagement, follow these steps.

  1. Wait 15 minutes after the first registration call for the device you’re testing with to ensure your device is properly registered in Engagement.
  2. Check the List you created in the Engagement UI and ensure the DeviceId you printed in Logcat shows up in the list.

For information about sending a test message in the Marketing Cloud Engagement, see Send a Test Message to Validate Accuracy.

Look through the output from the SDK’s getSdkState() method.

Sometimes the output from the SDK’s Get State method can exceed Android’s output length restrictions. Adding an indentSpaces to the output of JSONObjects can help bypass this restriction.

View code example for SDK version 8 and later
View code example for SDK version 7

When you debug push messaging, focus on the NotificationManager and PushMessageManager sections for key insights.

View code example for SDK version 8
View code example for SDK version 7

If you’ve implemented multiple push providers, review Troubleshoot Multiple Push SDKs for more information.