Important Updates to Android Library (3.0.0)

61 views
Skip to first unread message

Geddes Munson

unread,
Jan 3, 2013, 11:09:53 PM1/3/13
to mp-...@googlegroups.com
Hi, all!

We're happy to announce a new release of the Android Mixpanel API library, version 3.0.0.  This release includes some new behavior to support more robust push notifications and user privacy. You can get it here:


You can still get previous releases from 2.0 on via the tags page of our github repository. We recommend people intending to use initPushHandling() and the built in tools for responding to push notification messages upgrade to this release, and users starting new projects should start here. While the API hasn't changed since version 2.2.3, there are some configuration and behavior changes that users should be aware of when upgrading. The notes below are also included in the release notes, in the readme.txt of the distribution.

Changes in v3.0.0:
* Major change to configuration necessary for push notifications

  In version 3.0, you will need to add the following receiver to the <application> tag in your AndroidManifest.xml file to receive push notifications using initPushNotification.

  <receiver android:name="com.mixpanel.android.mpmetrics.GCMReceiver" android:permission="com.google.android.c2dm.permission.SEND" >
      <intent-filter>
          <action android:name="com.google.android.c2dm.intent.RECEIVE" />
          <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
          <category android:name="YOUR_PACKAGE_NAME" />
      </intent-filter>
  </receiver>

  Be sure to replace "YOUR_PACKAGE_NAME" above with the package name of your project

  (The value of the "package" attribute in your <manifest> tag.)

* Backward incompatible change: Major change to the handling of automatically assigned distinct ids

In version 3.0, library-assigned distinct ids are randomly generated and stored as needed. If you are upgrading from an older version that used the automatically generated distinct id, and you want to maintain the same distinct id across upgrades, you can generate it with the following code:

      String androidId = Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID);
      String oldStyleId = Build.PRODUCT + '_' + androidId;

      mMixpanel.identify(oldStyleId);

* Stop using version in artifact name
New versions of the Mixpanel library are named "MixpanelAPI.jar", rather than "MixpanelAPI_vXXX.jar".

If you have any questions about the new library, please reach out to sup...@mixpanel.com.

Thanks!

--
Geddes Munson
Solutions @ Mixpanel

Reply all
Reply to author
Forward
0 new messages