If your Android devices are not appearing in the Pushwoosh Control Panel after you've integrated the SDK, it is typically due to a configuration issue in your project. The best first step is to check your device's console logs (Logcat) for specific error messages during application launch.
Here are the two most common causes and their solutions.
1. Firebase Messaging is missing or failed to load
Pushwoosh relies on Firebase Cloud Messaging (FCM) for push delivery on Android. The com.google.firebase:firebase-messaging dependency is normally pulled in transitively by the pushwoosh-firebase module, so you usually do not need to declare it yourself.
Symptom in logs: an IllegalStateException similar to:
java.lang.IllegalStateException: com.google.firebase:firebase-messaging is missing or failed to load.
It is normally pulled in transitively by pushwoosh-firebase; add it explicitly only if you excluded it,
preferably via the Firebase BoM
Solution: this means the dependency was excluded or failed to resolve. Add it back explicitly using the Firebase BoM in your app-level build.gradle (do not use a dynamic + version):
dependencies {
implementation(platform("com.google.firebase:firebase-bom:<version>"))
implementation("com.google.firebase:firebase-messaging")
}
Also make sure your google-services.json is present and the Google Services plugin is applied.
2. Incorrect API token or token permissions
The token used by the SDK must be a Device API token and must have access to the corresponding project in your Pushwoosh account.
Symptom in logs: 401 Unauthorized errors when the SDK calls /registerDevice.
Solution:
- In the Pushwoosh Control Panel, go to Settings → API Access.
- Select the token configured in your app, or generate a new one of type Device (Device API methods such as
registerDevice,setTags,applicationOpenandpushStatrequire a Device token; a Server token will be rejected). - Make sure the token is granted access to your project.
- Save the changes.
After making these changes, uninstall the app from your test device, rebuild the project and run it again. The device should register successfully and appear in your Control Panel.
Comments
0 comments
Please sign in to leave a comment.