Skip to content

messagebird/android-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Bird Android SDK

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

How to

You can find full documentation here.

Step 1: Add Bird Android SDK dependency

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.

Step 2: Set Application Key

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>

Step 3: Add permissions

No additional permissions need to be set in AndroindManifest.xml. The user will be asked to give Push Notification permissions in runtime."

Step 4: Push Notifications

Firebase

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>

Examples:

Releases

No releases published

Packages

No packages published