If you are having trouble integrating the SDK, uploading your certificates or sending notifications, here are some suggestions.
Unable to resolve dependency [...]: Could not find any version that matches com.batch.android:batch-sdk:1.12+.
Batch is published to Maven Central. Sometimes, jCenter does not correctly mirror it, breaking the auto update of the artifacts.
To fix this, either switch to an explicit version (such as
1.12.0 rather than
1.12+), or add
mavenCentral() to your repositories in your build.gradle.
Please ensure you added the Play Services library in the dependencies. If you use Proguard (
"minifyEnabled=true" in the Gradle build), make sure you have added Batch's Proguard rules.
If you use Proguard, please make sure you have added Batch's Proguard rules. If your integration worked on the debug builds, it is probably because Proguard was disabled on that configuration.
This usually happens when the SDK is not integrated in ALL your activities.
Please make sure you call
Batch.User methods after
Batch.onStart() and before
There are several points you should check if Batch is unable to find a start event for your app:
- Integration issue: See if Batch is integrated in all your activities.
- Wrong API key: Make sure you are using a valid API Key (⚙ Settings → General).
- Emulator. Make sure you are testing on a real device (unless you're using Google API emulators).
- Logcat: Look for errors in logcat to understand why Batch is not starting in your app.
If Batch is unable to find a token, here are some suggestions to find the issue:
- Emulator. Make sure you are testing on a real device since Batch relies on the Play Services for push services (unless you're using Google API emulators).
- GCM sender ID. Check if you have set the GCM sender ID in your code as described here.
- Google Play services. See if you are using the most recent version of the Google Play Services by opening this link on your device.
Here are several points that may help:
- Network. Try turning off and on your WiFi connection or using a 3G/4G connection.
- Integration issue. See if Batch is registering a push token in your logs or if there are errors in your device logcat.
- Force close. Go to the system settings → Apps. Make sure your app is not force closed, otherwise it won't receive any notifications.
- Energy saving. Some energy saving features may kill the apps (Samsung Smart Manager) or delay push delivery when the device is low on battery (Doze). Try changing the priority of your push to see if that fixes the issue.
You can also check the status of every message sent to a specific device token (received, device disconnected, etc) using the FCM Diagnostics from the Google Play Developer Console.
There are several points you should check if Batch doesn't show any data on your dashboard:
- Dev/Live API key. Make sure that you used the Live API key in the build you uploaded to the store. Stats are only displayed for the Live API key.
- 24h delay. Installs, DAU, starts and redeems shown on the Analytics tab are updated on a 24h basis for the Live API key.
- Integration issue. If you still don't see any stats for your app 24h after changing the API key, see if you find anything related to Batch in your logs and double check your integration using the documentation.
GCM tokens are linked to a single Sender ID. Make sure the GCM Server API Key used in Batch's dashboard (⚙️ Settings → Push settings) matches the GCM sender ID used in your app. You will find more information here.
This error happens when GCM is not available for a short period of time. Try again later or fallback on cellular network.
Please reach us at email@example.com. Our team will help you to fix the issue.
You can find the list of GCM and Batch internal errors in the Notifications tab, by hovering on the error count.
GCM/FCM refused the credentials supplied in your app configuration
GCM sends this error when the token Batch tries to push is not valid anymore. This usually happens when users uninstall/reinstall your app.
On Android, tokens are linked to a specific sender ID. GCM will systematically send this error when a token is pushed with the wrong sender ID. Make sure you are using the same Sender ID you were using with your old push provider.
This internal error happens when the number of maximum send attempts is reached for a token. Feel free to reach us if you are seeing to many max_retry_attemps errors.
If the number of max_retry_attempts error suddenly increases, make sure you are using a "Server API key" to communicate with GCM (Developer dashboard → Credentials → API keys). If you are using an Android API key, you should generate a new Server API key and paste it in Batch's dashboard (⚙️ Settings → Push settings).