Integrate Pushwoosh Android SDK
Follow the steps below to get your Android application ready to receive pushes
Watch this video where our dedicated Customer Success team will guide you through the onboarding process at Pushwoosh, from setting up projects to sending your first communications.
Requirements
A configured Pushwoosh Application's Code available in Pushwoosh Control Panel in format XXXXX-XXXXX
A Firebase project and its Sender ID
An Android device or emulator with "Google Play Store (Services)" installed
Integration
For Gradle Versions less than 6.8
Include the following Maven repository URL in project's build.gradle:
Add pushwoosh library dependencies into your application's build.gradle:
Replace "+" with the current version of Pushwoosh and Android Support libraries.
For Gradle Versions 6.8 or Higher
Locate the Settings.gradle file in the root directory of your project.
Open the Settings.gradle file and declare the repositories like this:
Then, save the changes.
Next, open your project in Android Studio. Go Tools > Firebase > Cloud Messaging and click "Set up Firebase Cloud Messaging":
Connect your app with Firebase, grant Android Studio access to your Google account (if needed), and choose your Firebase project.
Then add FCM to your application and accept changes:
Add the following metadata to AndroidManifest.xml:
Please note that you must add meta-data inside the <application> tag
Where:
com.pushwoosh.appid
is your Pushwoosh Application Codecom.pushwoosh.senderid
is the Sender ID you received from Firebase Console
Please note that you need to add fcm_sender_id to res/values/strings.xml of your Android project:
Finally, register for push notifications:
Next steps
Customize Android SDKShare your feedback with us
Your feedback helps us create a better experience, so we would love to hear from you if you have any issues during the SDK integration process. If you face any difficulties, please do not hesitate to share your thoughts with us via this form.
Last updated