Skip to content

Android Tracking Implementation Guide

Info

As of version 1.1.4, GPS geo-location data is not captured by default and will only be derived from the IP address. You can set the geo-location enable by the trackerConfig.setGeoLocationEnabled(true). To capture GPS geo-location data (requires permission grant by user).

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 6.0.0.

Warning

If you needs legacy android support v4 UI library, please use Wogaa Tracker version 1.4.1.


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:6.0.0'
  }


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 (6.0.0)

Info

I/WOGAATracker: Started (6.0.0) shows tracker has started and the version number of the tracker

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

Info

- Staging received events will take about 10 seconds to process. (Last 24 hours)

- Production received events will take about 1 day to process.


Step 4. Verification of Android Implementation

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

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 support@wogaa.gov.sg

Reference Implementation

https://github.com/wogaa/mobile-tracker-examples/tree/main/android