Android – Quick Start

To get the base SDK loaded and running, you’ll need to:

  1. Import the SDK
  2. Update your Android Manifest file
  3. Initialize the SDK

Import the SDK

Bluedot Point SDK for Android is integrated into an application project as a Gradle dependency. Follow the steps below to integrate the SDK into your project.

1. Edit the root build.gradle file to include a JitPack entry in the repositories section.

...
allprojects {
   repositories {
      ...
      maven { url 'https://jitpack.io' }
   }
}

2. Include the Bluedot Point SDK as a dependency in the app’s build.gradle file within the dependencies section.

dependencies {
     ...
     implementation 'com.gitlab.bluedotio.android:point_sdk_android:15.5.3'
 }

Manifest requirements

In order to receive Bluedot service error events after initialization, a class that implements BluedotServiceReceiver should be implemented and registered in the AndroidManifest:

class ExampleBluedotServiceReceiver : BluedotServiceReceiver() {
     override fun onBluedotServiceError(error: BDError, context: Context) {
        // Handle error here.
     }
 }
 
 <application android:label="@string/app_name" >
     <receiver
        android:name="<path to your BluedotServiceReceiver implementation>"
        android:enabled="true"
        android:exported="false"
     >
        <intent-filter>
           <action android:name="io.bluedot.point.SERVICE" />
        </intent-filter>
     </receiver>
 </application>

Initialize the SDK

Now that the project has been set up, should initialize the Bluedot Point SDK from your Application class’s onCreate function with:

ServiceManager.getInstance(this).initialize("myProjectId", 
     (error) -> {
        // Handle initialization result
 });

At this point, you’ve got the basics together, but to get value from the SDK you’ll need to start getting location events – you can do so by using our Geo-triggering or Tempo features.

Created by Melwin Chiramel on December 21, 2020