Skip to content

Releases: mixpanel/mixpanel-android

Release v4.1.0

17 Apr 02:08
Compare
Choose a tag to compare

This release version adds support for Android in-app notifications, distinct_id aliasing, and several bug fixes. Please check the README for a comprehensive changelog.

v4.1.0 Beta 1

01 Apr 18:28
Compare
Choose a tag to compare
v4.1.0 Beta 1 Pre-release
Pre-release

This is a pre-release of version 4.1.0, which includes support for Mixpanel In-App notifications and a number of bugfixes.

This is an early pre-release, and shouldn't be used in production applications, but the interface is likely to remain very stable through the release version, and this version is appropriate to integrate in early development cycles.

The new in-app notification features of this release are documented here:

https://mixpanel.com/help/reference/android-inapp-notifications

Release v4.0.1

24 Mar 23:55
Compare
Choose a tag to compare

Bugfix and convenience release

  • Change to thread handling when showing surveys
  • Default event and property storage is now 5 days

v4.0.1 RC1

25 Feb 18:02
Compare
Choose a tag to compare
v4.0.1 RC1 Pre-release
Pre-release

This is a pre-release build, containing only a bugfix for applications that change the root activities of their applications after instantiating a Mixpanel object. The changes should not affect the majority of users.

The changes in this release will prevent crashes when the library attempts to show a survey with a parent application that does not exist. Applications that have this behavior should explictly call checkForSurveys()/showSurvey() to show Mixpanel survey content.

This pre-release will not be deployed to Maven central, but the AAR file is attached to this Github announcement, and can be used along with the source code.

v4.0.0

12 Feb 01:38
Compare
Choose a tag to compare

A major release of the Mixpanel Android Library, with a bunch of new features, including some possibly backward breaking changes.

New Features

Support for getPeople().union(), getPeople().setOnce() and getPeople().unset() has been added.

These are all new methods on the MixpanelAPI.People object.

Support for Mixpanel surveys.

Support takes the form of two new API calls
and some new default automatic behavior

  • MixpanelAPI.getPeople().checkForSurveys will query Mixpanel for surveys
    targeted to the current user, and pass a Survey object
    to a callback when a survey is found, or null if no Survey could be found
  • MixpanelAPI.getPeople().showSurvey will launch a new Activity that shows
    the given survey to the user, and send the results of the survey to Mixpanel
  • Unless configured with com.mixpanel.android.MPConfig.AutoCheckForSurveys metadata,
    applications using the Mixpanel library will automatically query for and show
    an available survey on application startup.

Automatic referrer tracking from the Google Play Store

Adding the following to the main tag in your AndroidManfest.xml will automatically set super properties associated with the referrer to your Google Play Store listing:

<receiver android:name="com.mixpanel.android.mpmetrics.InstallReferrerReceiver"
        android:exported="true">
  <intent-filter>
      <action android:name="com.android.vending.INSTALL_REFERRER" />
  </intent-filter>

Manifest metadata for library configuration

Users can now configure MixpanelAPI behavior by including tags in the tag of their apps. The following meta-data keys are supported:

com.mixpanel.android.MPConfig.FlushInterval (value: a time in milliseconds)

If provided, the library will use this interval instead of the default as a target maximum duration between attempts to flush data to Mixpanel's servers.

com.mixpanel.android.MPConfig.DisableFallback (value: a boolean)

If provided and equal to "false", the library will attempt to send data over HTTP if HTTPS fails.

com.mixpanel.android.MPConfig.AutoCheckForSurveys (value: a boolean)

If provided and equal to "false", the Mixpanel library will not attempt to retrieve and show surveys automatically, users can still show surveys using MixpanelAPI.getPeople().checkForSurvey and MixpanelAPI.getPeople().showSurvey

Maven-Central artifact for Maven, Gradle, and AndroidStudio users

An aar artifact is now available in the Maven Central repository. You can add Mixpanel to your project by adding the following to your gradle.build file

dependencies {
    compile "com.mixpanel.android:mixpanel-android:4.0.0@aar"
}

Changes to the steps required to integrate the Mixpanel library in your project.

In previous releases, the Mixpanel library was distributed as a jar file. As of 4.0.0, use of the library varies with the build tools chosen.

For Eclipse and Ant

For building with Eclipse or ant, download the Mixpanel repository and follow the steps outlined here, for "Referencing a Library Project":

http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject

For Gradle and Android Studio

For building with Gradle or Android Studio- add the following dependency to your build.gradle file

      dependencies {
          compile "com.mixpanel.android:mixpanel-android:4.0.0@aar"
      }

A version of each release is hosted in Maven central, and will not require you to manually download or install any artifacts.

Fallback to HTTP from HTTPS is disabled by default

In previous releases, the Mixpanel library would automatically fall back to communicating over HTTP if HTTPS communication failed. This was to facilitate use on Android 2.2 (Froyo) and older OS versions, which had poor support for modern SSL certificates.

In the 4.0.0, HTTP fallback behavior is disabled by default, but can be reenabled for users who intend to ship to older devices by adding the following tags to the tag in your application's AndroidManifest.xml:

 <meta-data android:name="com.mixpanel.android.MPConfig.DisableFallback"
           android:value="false" />

Improved startup time

Previous releases performed some synchronous disk IO immediately when instances were created. This was typically very quick, but in 4.0.0 this IO is done in a separate thread and loaded lazily by the library.

API Behavior changes

Passing a null token or null context to MixpanelAPI.getInstance() will now result in a null return value.

The automatic $bluetooth_enabled property will only appear in recent OS versions

The automatic $bluetooth_enabled property will only be added automatically on devices with OS version greater than API 18/OS version 4.3/Jelly Bean MR2. This feature had a critical bug on older platforms, and was not in popular use.

Super properties named "distinct_id" will be ignored

Previous versions of the library allowed setting "distinct_id" as a super property, and would use this value as the distinct id for event tracking. This behavior has been removed, and super properties with the name "distinct_id" will be ignored. Callers can still provide their own value for "distinct_id" in the properties argument to track.

A scary stack trace log in the common, not-scary case of fallback from HTTPS to HTTP has been removed.

MixpanelAPI.setFlushInterval() has been deprecated.

Use the meta-data tag:

 <meta-data android:name="com.mixpanel.android.MPConfig.FlushInterval"
   android:value="XXX" />

instead, where "XXX" is the desired interval in Milliseconds.

MixpanelAPI.enableFallbackServer() has been deprecated.

Use the meta-data tag:

<meta-data android:name="com.mixpanel.android.MPConfig.DisableFallback"
  android:value="false" />

to enable fallback to HTTP if HTTPS is unavailable or the library is running on an Android 2.2 or older device.

Default build system for library is now Gradle

ant is no longer the primary build system for development. Although we intend to continue to support ant builds of the library, we will be using gradle to build and package the library going forward.

v4.0.0 BETA

03 Jan 18:57
Compare
Choose a tag to compare
v4.0.0 BETA Pre-release
Pre-release

Superceeded by release 4.0.0 - please use that one instead.

Release v3.3.2

15 Nov 17:12
Compare
Choose a tag to compare

This release contains a known bug that can cause problems if tracking takes place outside of the main application UI thread. If you're planning to track outside of this thread, please use release v3.3.1