logo indigitall
All topics / SDK Integration / App Integration

App Integration

Our Software Development Kit for your app.

Android SDK

Introduction

This section provides the basic information to setup the indigitall SDK in your app.

It will be necessary to have the identifier required so that the app, in which you want to integrate the SDK, can communicate with the indigitall environment. To receive this identifier the developer must provide to indigitall the necessary data to send the notifications (Server Key for notifications) obtained from the Firebase Console.

The following tutorial explains how to get these certificates. How to obtain the “Server Key” from FCM.

You can learn how obtain your App Key in our User documentation.

Installation

The last version of indigitall SDK is available through Maven Central.


...

android {
    compileSdkVersion 28
    defaultConfig {
        ...

        minSdkVersion 16
        targetSdkVersion 28

        ...
    }

    ...
}

...

repositories {
    mavenCentral()
}

dependencies {
    ...

    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.google.firebase:firebase-messaging:18.0.0'
    implementation 'com.google.android.gms:play-services-location:16.0.0'

    implementation 'com.indigitall:android:3.1.+'
}


<manifest>
  ...
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

  <application>
    ...
    <!-- [START indigitall_services] -->
    <service android:name="com.indigitall.android.services.StatisticService" />
    <service android:name="com.indigitall.inapp.services.StatisticInAppService" />
    <service android:name="com.indigitall.android.services.NightService" />
    <receiver android:name="com.indigitall.android.receivers.BootReceiver">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />
        </intent-filter>
    </receiver>
    <receiver android:name="com.indigitall.android.receivers.LocationReceiver">
        <intent-filter>
            <action android:name="LocationReceiver.Action.LOCATION_UPDATE" />
        </intent-filter>
    </receiver>
    <!-- [END indigitall_receivers] -->

    <!-- [START firebase_service] -->
    <service android:name="com.indigitall.android.services.FirebaseMessagingService">
        <intent-filter>
            <action android:name="com.google.firebase.MESSAGING_EVENT" />
        </intent-filter>
    </service>
    <!-- [END firebase_service] -->

    <!-- [START firebase_iid_service] -->
    <service android:name="com.indigitall.android.services.FirebaseInstanceIdService">
        <intent-filter>
            <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
        </intent-filter>
    </service>
    <!-- [END firebase_iid_service] -->

    <!-- Put your colour icon resource -->
    <meta-data android:name="indigitall.color" android:resource="@color/colorPrimary"/>
    <!-- Put your monochrome icon resource -->
    <meta-data android:name="indigitall.icon" android:resource="@drawable/ic_monochrome"/>

    ...
  </application>
</manifest>

Initialization

Initialize indigitall library with the Indigitall.init() method to begin receive push notifications.


import com.indigitall.android.Indigitall;

...

Indigitall.init(context, "<YOUR-APP-KEY>", "<YOUR-SENDER-ID>");

...

Further steps

Now you will see in logs how indigitall register your device. Search the word "deviceId" and get it value. It is an alphanumeric random and uniq id generated for indigitall.


deviceIdAndroid

Now you can send your first Notification

Segment your users:

More references