Android Troubleshooting

This guide provides solutions for common Android issues.

Missing Methods

If you are getting a NoSuchMethodError when building your app, try the following:

  • Within your project’s build.gradle file, update the compileSdkVersion to the latest Android API level.

  • Verify that your Google Play Services dependencies are using matching versions. The following code, for example, would produce an error:

    dependencies {
        compile 'com.android.support:support-v4:25.3.0'
        compile 'com.google.android.gms:play-services-gcm:10.0.0'
        // Does not match 10.0.0 above
        compile 'com.google.android.gms:play-services-location:10.0.1'
    }

Push

Not Receiving Push

If your app is not receiving push, please attempt each of the following:

  • Verify push is really enabled on your app. On your device, go to Settings > Apps, then click on your app and verify the Show notifications checkbox is checked.
  • Verify that user notifications are enabled.
  • Use the Channels API to check your device’s opt-in status.
    • If opted-in: Your FCM API key (located in the Go dashboard on the Settings > Services page) may be invalid. Please review the instructions here and verify you have configured FCM correctly.
    • If opted-out: Your google-services.json might be missing.
  • Verify that your app configuration in your airship config contains the correct application key and application secret.
  • For Fire OS apps, verify you have the correct api_key.txt file located in your project’s assets folder.
  • Check your logcat for errors or warnings, which may provide valuable hints during debugging. The log level can be modified in the airship config options class.
  • Verify your device’s network connection. Push notifications will not be delivered without a network connection. Unstable network connection may potentially prevent push notifications from arriving.

Duplicate Notifications

If your notifications are appearing twice on devices, you may be manually posting the notification. Posting notifications is handled for you by the Airship SDK. Double check that you are not making a call to the NotificationManager within an extended PushListener, NotificationListener, or NotificationProvider.

Analytics

Direct Opens not Counted

Disabled user notifications and duplicating messages results in the direct open count not incrementing.

These two issues combined mean you are only posting the manually created notification, while the notification sent via Airship gets dropped. We only count notifications posted by Airship, thus the direct open count is not incremented. To remedy this problem, you need to fix the two root causes by:

Android Knowledge Base

Please visit the Airship Knowledge Base for additional assistance.