http://159.8.242.86:8000/wp-content/uploads/2016/09/Pasted-image-at-2016_09_16-12_16-PM-1.png

Welcome to 8thLAB Android Tracker SDK documentation!

Contents:

Library Dependencies and Requirements

Dependencies:

  • OkHttp - version: 3.4.1; HTTP post request to our backend service with detected MAC addresses

Requirements:

  • Minimum Android SDK version: 9
  • Target/Compile Android SDK version: 23

Library Orchestration

Publication flow:

  • SNAPSHOT:

    1. GIT Commit
    2. Green Travis CI Build
    3. Snapshot Version publication to OSS repository
  • RELEASE:

    1. Green local build

    2. Version change

      1. Git Tag
      2. Version update in version file
    3. Publication

      1. Push release to GitHub
      2. Release version publication
    4. Promote version to maven central

Used android features

Library use different features depending on android version

Because of used features apropriate permission are present in AndroidManifest.xml

  • BLUETOOTH
  • BLUETOOTH_ADMIN
  • ACCESS_COARSE_LOCATION
  • INTERNET
  • ACCESS_NETWORK_STATE

Usage

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.a8thlab.trackersdk.A8thLABSDK;

public class TrackerSDKTest extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tracker_sdktest);
        String appId="APP_ID";
        String appToken="APP_TOKEN";
        A8thLABSDK.initializeSDK(getApplicationContext(), appId, appToken);
    }
}

In order to use library, execute static method initializeSDK that is present in A8thLABSDK class . Method accepts three parameters: application context, your unique application id provided by us, your unique application token provided by us.

After that method execution apropriate threads and listeners are created, depending on android version and suported features.

Simplified flow

Simplefied flow of library is as follows:

  1. Start Bluetooth discovery

  2. On device discovery:

    1. POST disoverd device MAC to our backend service
  3. Continue device discovery after 250ms

Indices and tables