website logo
HomeGo to Dashboard
User Guide
How-To Videos
Developers
Navigate through spaces
⌘K
Getting Started
Introduction
Compatibility
Terminology
SDK Installation
Shopify
Any Website
Dukaan
Angular 2+
WooCommerce
WordPress
Android Native
iOS Native
Flutter
Cordova
Ionic
React Native
Data Integration
Data Models
Mandatory Events
Mandatory Properties
Call to Action
System Events
Device Properties
Docs powered by archbee 

Get Started for Android

10min

Cooee's Android SDK enables app developers to track and retain their customers with template-less in-apps. This guide will walk you through the easy steps of installing the Cooee SDK, configuring it, and verifying the data within Cooee's dashboard while you finish your coffee.

Configure Repository

This step is not required for v1.4.1 and above.

If you use an older Gradle (<v7.0), add the below maven link to your project-level build.gradle file.

Groovy
|
allprojects {
    repositories {
        maven { url "https://letscooee.jfrog.io/artifactory/default-maven-local" }
    }
}


For the newer version, add below to settings.gradle file-

Groovy
|
dependencyResolutionManagement {
    repositories {
        maven { url "https://letscooee.jfrog.io/artifactory/default-maven-local" }
    }
}


Install Dependency

Update your app-level build.gradle with the following changes to install the Cooee SDK.

Groovy
|
android {
    ...
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    ...
    implementation 'com.letscooee:cooee-android-sdk:x.y.z'
}


Replace x.y.z with the latest release of the SDK

Document image


Configure Credentials

Add the following in AndroidManifest.xml inside the application tag:

XML
|
<meta-data
    android:name="COOEE_APP_ID"
    android:value="MY_COOEE_APP_ID"/>


Replace MY_COOEE_APP_ID with the App ID which is present at Cooee Portal.

Permissions Setup (Optional)

Cooee SDK supports prompting the following permissions via engagement. To make it work, you need to add the following to the app's AndroidManifest.xml file:

XML
|
<!-- Cooee SDK use this permission to run Augmented Reality engagements -->
<uses-permission android:name="android.permission.CAMERA" />

<!-- Cooee SDK use this permission to run Location based engagements -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<!-- Cooee SDK use this permission to post an notification(required only on Android 13 and above) -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />


Initialize the Cooee SDK

In the onCreate() method of your application’s main activity, add the below line. This will initialize the Cooee SDK.

Java
Kotlin
|
CooeeSDK cooeeSDK = CooeeSDK.getDefaultInstance(this);


Android 13 and above needs permission to be granted to Post a Notification. You will need to add the below code once you initialize CooeeSDK.

Java
Kotlin
|
private void requestNotificationPermission() {
    cooeeSDK.requestNotificationPermission(activity);
}




Updated 03 Mar 2023
Did this page help you?
Yes
No
PREVIOUS
Android Native
NEXT
Tracking Events on Android
Docs powered by archbee 
TABLE OF CONTENTS
Configure Repository
Install Dependency
Configure Credentials
Permissions Setup (Optional)
Initialize the Cooee SDK