Bird Android SDK is a single integration point to bring the power of BirdCRM in building connected user experience to your application.
Using Bird Android SDK, you get access to:
- Collect Contacts
- Send Push Notifications
- Event Tracking
You can find full documentation here.
Add the com.bird:android-sdk
dependency to your app’s build.gradle
.
dependencies {
implementation("com.bird:android-sdk:+")
}
Make sure to run Gradle Sync to build your project using the newly added dependency.
Add a new string to your app's strings.xml
with the name com_bird_application_key
. You can get the value of this application key from Bird Dashboard / Preferences / Applications.
<resources>
<string translatable="false" name="com_bird_application_key">YOUR_APPLICATION_KEY</string>
</resources>
No additional permissions need to be set in AndroindManifest.xml. The user will be asked to give Push Notification permissions in runtime."
Add Firebase credentials file
Get google-service.json
file from your Firebase project and add it to your android application. See more information here
And add the com.google.gms.google-services
plugin to both your top-level build.gradle and your app’s build.gradle.
// Inside the top-level build.gradle
plugins {
id("com.google.gms.google-services") version "4.4.0" apply false
}
// Inside app's build.gradle
plugins {
id("com.google.gms.google-services")
}
Make sure to run Gradle Sync to build your project using the newly added plugin.
Add BirdFirebaseMessagingService
Add the following com.bird.BirdFirebaseMessagingService
as a service inside AndroindManifest.xml
.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application>
<!-- START: Add This Part -->
<service
android:name="com.bird.BirdFirebaseMessagingService"
android:exported="false"
tools:ignore="Instantiatable">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<!-- END -->
</application>
</manifest>