Skip to content

cellrebel/CellRebelSDK-debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 

Repository files navigation

CellRebel Android SDK

Notice for existing users updating to CellRebelSDK 1.7.0 and newer

CellRebelSDK is no longer requires InitProvider to be added to the application manifest. Please remove SdkInitProvider from your application Manifest file after update.

Download

Add CellRebel Maven repository in project build.gradle file:

allprojects {
    repositories {
        maven {
            url 'https://raw.githubusercontent.com/cellrebel/CellRebelSDK-debug/master/releases'
        }
        ...
}

Then, add the library dependency to module build.gradle:

dependencies {
    ...
    implementation 'com.cellrebel.android:cellrebel-sdk:1.9.23'
}

CellRebel SDK requires Java 8, add target and source compatibility to android compile options in module build.gradle:

android {
    ...
    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }
}

Usage

Initialize SDK using your unique CLIENT_KEY string on application create:

import com.cellrebel.sdk.workers.TrackingManager;

public class App extends MultiDexApplication implements LifecycleObserver {

    @Override
    public void onCreate() {
        super.onCreate();

        TrackingManager.init(this, "CLIENT_KEY");
    }
}

Use startTracking to start measurement. On the first launch it's best to call this method after user response on location permission dialog. During the next sessions this method should be called on main activity onCreate lifecycle callback:

TrackingManager.startTracking(this);

In some (rare) cases, if very high load tasks need to be performed, stopTracking can be used to abort an ongoing measurement sequence:

TrackingManager.stopTracking();

Demo project

https://github.com/cellrebel/CellRebelSDK/tree/master/demo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published