For a React Native (bare workflow) Android app, add the Pushwoosh meta-data tags inside the <application> element of android/app/src/main/AndroidManifest.xml.
Required meta-data
com.pushwoosh.appid— your application code from the Pushwoosh Control Panel.com.pushwoosh.apitoken— your Device API Token, found in the Control Panel under API Access. Without it the SDK’s requests are rejected with 401.
<application ...>
<meta-data
android:name="com.pushwoosh.appid"
android:value="XXXXX-XXXXX" />
<meta-data
android:name="com.pushwoosh.apitoken"
android:value="YOUR_DEVICE_API_TOKEN" />
</application>
If you initialise the plugin from JavaScript with Pushwoosh.init({ pw_appid: "XXXXX-XXXXX" }), the com.pushwoosh.appid tag is optional, but the API token entry is still needed.
No Sender ID any more
A com.pushwoosh.senderid meta-data tag is no longer used. Legacy FCM Sender ID / Server Key credentials were discontinued by Google in June 2024, and in the current Pushwoosh Android SDK setSenderId() is a no-op. Remove the tag if you still have it — FCM configuration now comes entirely from google-services.json plus the FCM v1 service account key uploaded in Pushwoosh.
Additional troubleshooting
- Place
google-services.json(downloaded from Firebase Console) inandroid/app/, and apply thecom.google.gms.google-servicesGradle plugin in your app-levelbuild.gradle. - In Pushwoosh, go to Settings → Configure platforms, click Connect in the Android row and upload the FCM service account JSON key from Firebase Console → Project settings → Service accounts.
- Make sure the package name in
google-services.jsonmatches your releaseapplicationId.
Rebuild the application after making these changes.
Comments
0 comments
Please sign in to leave a comment.