Mixpanel v4.5 Release Notes

    • Introducing dynamic event binding! Developers and stakeholders can now bind Mixpanel events to user interactions using the UI in the Mixpanel web application.

    • added timeEvent, for automatically adding duration to events with a begin and end.

    • New configuration directives

    The 4.5 version of the library allows for meta-data of the form

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

    This tag will only be useful in specific circumstances, for users with certain kinds of exotic custom builds. Most users of the library will not require it. (You'll get messages in your logs if the library thinks that you need it)

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

    When included in your Manifest with value="true", this tag disables the use of the connection 💻 gesture to the mobile event binding UI in the Mixpanel web application. Events created and bound in the UI will still be sent by the application, this directive just disables use the connection gesture to pair with a Mixpanel to create and edit event bindings. If the application is run in an emulator, it will still check for pairing with the editor.

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

    When included in your Manifest with value="true", this tag disables pairing with the mobile 💻 event binding UI in the Mixpanel web application. Events created and bound in the UI will still be sent by the application, this directive just disables the emulator binding behavior. Use of the connection gesture on a physical device will still work for pairing with the editor.

    • Easier use of Proguard with the library

    To use the Mixpanel library with Proguarded builds, add the following to your proguard.cfg file

    -keep class com.mixpanel.android.abtesting.** { *; }
    -keep class com.mixpanel.android.mpmetrics.** { *; }
    -keep class com.mixpanel.android.surveys.** { *; }
    -keep class com.mixpanel.android.util.** { *; }
    -keep class com.mixpanel.android.java_websocket.** { *; }
    
    -keepattributes InnerClasses
    
    -keep class **.R
    -keep class **.R$* {
        <fields>;
    }
    

    Mixpanel uses the R class of your package to facilitate easier dynamic tracking across builds of your application.

    • The deprecated methods setFlushInterval and checkForSurvey are now no-ops

    This method was deprecated in version 4.0, and now is a no-op. To change the flush interval for your application, use the com.mixpanel.android.MPConfig.FlushInterval meta-data tag in your manifest. To get available surveys, call getSurveyIfAvailable()

    • The minimum Android OS version necessary for surveys, in-app notifications, and dynamic event binding has been increased to JellyBean/API 16. The minimum OS version to use basic tracking features has been increased to Gingerbread/API 9.