Conscent.ai Developer Documentation
  • Version 2.0
    • Using Conscent.ai
    • Web SDK
    • Login
    • Logout
    • User Details Drawer
    • Google One Tap
    • Mobile SDK
      • iOS(Swift)
        • In-App Purchases with Conscent
      • Android SDK
      • React Native SDK
      • Google In-App Purchases with Conscent
      • Apple In-App Purchases with Conscent
    • Facebook SSO Integration Guide
    • Landing Page API v 2.0
    • AMP Integration
    • Integrating APIs(v2)
      • Purchase Details
      • User Registered Or Not
      • User Registrations
      • Subscription Plans Details
      • Get User Details
      • Add Subscription If User Registered
      • Update UserDetails
      • Update SubscriptionDetails
      • Get All Transaction Details
    • IAM System API Documentation
  • Version 1.0
    • Getting Started
    • On Board
    • Using Conscent.ai
    • Authentication
    • Web SDK
    • Login
    • Logout
    • Amp Documentation
    • Mobile SDK
      • Android
      • Flutter
      • iOS(Swift)
      • React Native SDK
    • Auto Login
    • Creating External Purchases
    • Landing Page API
  • Login Screen Customization
  • Integrating Client Payment Gateway
  • Integrating with APIs
    • User Details and Subscriptions Information
    • Purchased Subscriptions
    • User and Purchase Details
    • Client Purchases
    • Client Micropayments
    • Client Passes
    • Cancel Active Subscriptions
    • Delete User
  • Events API Docs
    • Different Types of Events
    • SSO Login Flow
  • Discount Coupon
    • Dynamic Coupon API Generation:
  • New Webhooks
    • Meter Banner Webhook
    • Paywall Webhook
    • SignUp Webhook
    • Refund Webhook
    • Purchase Webhook
    • Subscription Landing Page Webhook
    • Popup Webhook
    • User Update Webhook
    • Payment Gateway Webhook
    • Review Page Webhook
    • Transaction Webhook
    • Login Webhook
    • Cancel Subscription Webhook
  • Old Webhooks
    • Sign Up Webhook
    • Login Webhook
    • Subscription Payment Webhook
    • Subscription Cancelled Webhook
    • Pass Payment Webhook
    • Subscription Bundle Payment Webhook
    • Review Subscription Webhook
    • Micro Payment Webhook
    • How to validate Webhooks?
  • Registering The Content
    • Create Content
    • Edit Content
    • View Content
  • Country Code List
  • Supported Currencies and Payment Gateways
    • Stripe Supported Country with Currency
    • Razorpay Supported Country with Currency
    • Paypal Supported Country with Currency
  • Errors
  • Loyalty System
    • Web SDK
    • iOS SDK
    • Android SDK
    • Flutter SDK
    • API from server
Powered by GitBook
On this page
  • Initialize SDK
  • Add Dependencies
  1. Loyalty System

Android SDK

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

Initialize SDK

The following guide provides steps to initialize the Conscent.ai 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 gradle.properties file (your_project/gradle.properties):

authToken=jp_lumadc0egqfu7bvmh1g7pe9t13

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 "http://jitpack.io"
              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 {
       repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
       repositories {
... maven {
               url "http://jitpack.io"
               credentials { username authToken }
           }
} }

Add the Conscent.ai 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?) {
      super.onCreate(savedInstanceState)
      BluePine.stateBluePine(this.applicationContext)
} }
  • If you are in a composable

@Composable
fun Greeting(name: String, modifier: Modifier = Modifier)
{
  val context = LocalContext.current
  Text(
    text = “Open BluePine”,
    modifier = Modifier.clickable {
      BluePine.stateBluePine(context)
    },
) }
PreviousiOS SDKNextFlutter SDK

Last updated 1 year ago

Sync should succeed, at this point