Android Tracking Implementation Guide

Info

As of version 1.1.4, GPS geo-location data is not captured and will only be derived from the IP address. To capture GPS geo-location data (requires permission grant by user), please use version 1.1.3.

Abstract

In this section we will walk through how you can implement and verify WOGAA tracking for your mobile application on Android

Warning

Do not reshare this document with anyone unless they need to implement WOGAA tracking on their mobile applications.


Latest Version

The latest version of WOGAA Mobile Trackers is 1.2.0.


Overview

  1. Install via Gradle.
  2. Implement codes for Android tracking.
  3. Check Android implementation
  4. Verification of Android implementation

Step 1. Install via Gradle

Install via Gradle

Gradle is an open-source build automation tool that is commonly used to manage dependencies.

Install with Gradle

Add the following lines to your App Level Gradle build:

repositories {
  maven {
    url "https://trackers.wogaa.sg/android"
  }
}

dependencies {
  implementation 'sg.wogaa:tracker:1.1.+'
}


Step 2. Implement codes for Android Tracking

In your MainActivity class,

  1. Add the following codes in onCreate() method or when your application starts for the appropriate environment.

For Staging

Tracker.start(this);

For Production

Tracker.start(this, Environment.PRODUCTION);


Step 3. Check Android Implementation

Method 1: Manually check the logs

Example

I/WOGAATracker: Started (1.2.0)
I/WOGAATracker: Sent: 1

Info

I/WOGAATracker: Started (1.2.0) shows tracker has started and the version number of the tracker
I/WOGAATracker: Sent: 1 shows number of successful event(s) being sent to our backend system

Method 2: Use tool to check if data is being received in your environment(s).


Step 4. Verification of Android Implementation

A verification email will be sent once we have successfully received data from your mobile application.

It may take up to 7 working days for the verification. Please let us know if there is any issues with regards to this via wogaa@tech.gov.sg