Android SDK

Setting up the SDK (Loyalty Platform) in your Android app

Initialize SDK

The following guide provides steps to initialize the SDK for your Android application. Please follow all the steps below carefully.

minimum sdk required is 26. Please change it in app/build.gradle

Add Dependencies

Add Auth Token

To access Bluepine’s private JitPack library, add this line in your project's file (your_project/


Add JitPack Repository

In your project-level build.gradle file (your_project/build.gradle), add the

maven repository inside the allprojects closure:

buildscript {
   allprojects {
      repositories {
          maven {
              url ""
              credentials { username authToken }
} }

Gradle 7.0+

If the allprojects closure does not exist, in your project's settings.gradle file (your_project/settings.gradle), add the maven repository:

  dependencyResolutionManagement {
       repositories {
... maven {
               url ""
               credentials { username authToken }
} }

Add the SDK dependency

implementation 'club.conscent:loyalty_native_android:1.2.7'

Sync your project with Gradle files by clicking Sync Now.

Pair SDK with Dashboard

Register Package Name

Open your Conscent .aiDashboard and go to Settings > Basic Details and register a Package Name.

Set Package Name

Bluepine.setPackageName("<package_name_same_as_registered_in_cons cent_dashboard>");

Initialize SDK

The final step of initialization is to call the setPartnerIdAndUserId method. Initialise with a Partner ID

BluePine.setPartnerIdAndUserId(“partnerId”, “UserID”)

Initialize the SDK in your app's Application class or main entry point of the app. For integration purposes:

  • If you are under activity

  import com.example.bluepine.module.BluePine
  class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
} }
  • If you are in a composable

fun Greeting(name: String, modifier: Modifier = Modifier)
  val context = LocalContext.current
    text =Open BluePine”,
    modifier = Modifier.clickable {
) }

Last updated