New Java and Android Tracker versions released

27 December 2014  •  Alex Dean

We are pleased to release new versions of the Snowplow Android Tracker (0.2.0) and the Snowplow Java Tracker (0.6.0), as well as the Java Tracker Core (0.2.0) that underpins both trackers. Many thanks to XiaoyiLI from Viadeo, Hamid from Trello and former Snowplow intern Jonathan Almeida for their contributions to these releases!

In the rest of this post we will cover:

  1. Vagrant support
  2. Updates to Java Tracker Core
  3. Updates to the Java Tracker
  4. Updates to the Android Tracker
  5. Upgrading the Java Tracker
  6. Upgrading the Android Tracker
  7. Documentation
  8. Getting help

1. Vagrant support

A big focus for 2015 is going to be on making it easier to contribute to the various Snowplow projects. As part of this, we will be implementing a standard quickstart process for hacking on any given Snowplow repository, making heavy use of Vagrant.

The Java and Android Trackers are among the first Snowplow projects to get the Vagrant quickstart treatment. Both repositories have been updated so that you can start working on the codebase with a simple vagrant up && vagrant ssh; the installation of all required development and build tools is handled automatically for you. Here is the Android Tracker quickstart:

 host$ git clone https://github.com/snowplow/snowplow-android-tracker.git
 host$ cd snowplow-android-tracker
 host$ vagrant up && vagrant ssh
guest$ cd /vagrant
guest$ ./gradlew clean build

We hope you find this useful - let us know how you get on with it!

2. Updates to Java Tracker Core

The new version of the Java Tracker Core is 0.2.0. The new releases of the Android and Java Tracker both use this new Tracker Core release.

One important change here was to remove Guava as a dependency; this dramatically reduces the tracker’s size, which is a key constraint for Android usage (#105). Many thanks to Hamid for contributing this.

We have also fixed some important bugs in the Java Tracker Core:

  • XiaoyiLI spotted and fixed an incorrect schema for trackScreenView (#104)
  • We moved setting the tracker’s platform out of the Subject class into the Tracker class. Without this, events tracked without a Subject could end up without a platform, and thus fail validation (#103)
  • We made the setSubject method on the Tracker public (#109)

Finally, we made an important API change: trackUnstructuredEvent now expects its eventData argument to be of type SchemaPayload, not Map<String, Object> (#76). At the same time we added @Deprecated on the unused SchemaPayload methods (#85); thanks to Jonathan Almeida for both of these!

3. Updates to the Java Tracker

The only updates in the Java Tracker are the updated Java Tracker Core dependency and the addition of the new Vagrant development environment.

4. Updates to the Android Tracker

As well as the updated Java Tracker Core dependency and the addition of the new Vagrant development environment, the build process for the Android Tracker has been refreshed, with new Gradle and Android SDK versions; many thanks to Hamid for contributing this!

We also added in some additional logging in the Emitter class, contributed by XiaoyiLI.

5. Upgrading the Java Tracker

The new version of the Snowplow Java Tracker is 0.6.0. The Java Setup Guide on our wiki has been updated to the latest version.

When upgrading, make sure to update any calls to trackUnstructuredEvent as per the above.

6. Upgrading the Android Tracker

The new version of the Snowplow Android Tracker is 0.2.0. The Android Setup Guide on our wiki has been updated to the latest version.

Don’t forget to update the dependency of Java Tracker Core to 0.2.0 as well as the Android Tracker itself. And when upgrading, make sure to update any calls to trackUnstructuredEvent as per the above.

7. Documentation

You can find the revised Android and Java Tracker usage manual on our wiki.

You can find the full release notes on GitHub as follows:

8. Getting help

Both of these trackers are still very young; please do share any user feedback, feature requests or possible bugs.

Feel free to get in touch or raise an issue (Java Tracker issues; Android Tracker issues) on GitHub!