SDK Installation Guide
  • 16 Apr 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

SDK Installation Guide

  • Dark
    Light
  • PDF

Article Summary

Welcome to the Webtrends Mobile SDK for Android. The Library provides a way to use Analytics products in your native Android applications. The Analytics SDK features a highly customizable integration that allows you to send data to Webtrends every time a significant event occurs in your mobile application. You can start with our most basic implementation, which captures application events such as starts and stops, with no additional coding.

First, install the SDK, using the instructions below.

Installing the SDK

  1. Download the SDK

    Download the Mobile Application Analytics library for Android from the Webtrends Downloads page.

    The SDK is packaged into a ZIP file. Once extracted, you will find:

    • The compiled SDK (an Android AAR file)
    • A README.txt file describing the package
    • The Hybrid Guide for the SDK (Webtrends-HybridAppDevelopersGuide.pdf)
    • Webtrends-mobile-hybrid-lib.3.0.js (Javascript enabling Analytics features in hybrid apps)
    • Webtrends-mobile-lib.3.0.js (Webtrends Mobile Application Library)
    • A sample webtrends.xml file
    • A sample application that uses the SDK
  2. Import the SDK into Your Project

    Once you have an Android project, adding the SDK is simple. These instructions will be based on using Android Studio, but they may easily be adapted for use with Eclipse or any other Android IDE.

    1. Once the SDK is downloaded and extracted, open up your Android project.
    2. Select your project root, then choose Project Structure... from the File menu.
    3. Click the + sign on the top left to add a new module.
    4. Select Import .JAR/.AAR Package from the list of options and click Next.
    5. Browse to the extracted webtrends-sdk-release-xxx-lib.aar file. This filename will vary from version to version. Click Finish to import.
    6. With your main module (your application) selected, click the Dependencies tab.
    7. Click the + sign at the bottom to add a Module dependency to your application.
    8. Select the module that you just imported and click OK.
  3. Add the webtrends.xml file to Your Project

    Create a new webtrends.xml file or import the included webtrends.xml file into your project's resources (res/values/) directory. The webtrends.xml file contains required and optional configuration settings. The only required entry in this file is wt_dc_dcsid(your Analytics DCSID for this application).

    Open the file for editing and change the following values:


<?xml version="1.0" encoding="utf-8"?>
<resources>
        <!-- Analytics -->
        <string name="wt_dc_dcsid">YOUR_DCSID</string>
 
 </resources>
 

Your project is now configured to use the Webtrends Mobile SDK.


Was this article helpful?