mixpanel-android icon indicating copy to clipboard operation
mixpanel-android copied to clipboard

Add 'trackAutomaticEvents' as a required param in getInstance' and remove Mixpanel server api call for `Autotrack` setting

Open zihejia opened this issue 2 years ago • 0 comments

Since this PR, we are deprecating the Automatically collect common mobile events setting from Mixpanel website in favor of reducing crashes and race conditions when collecting common mobile events.

image

Alternatively, you need to specify a new param trackAutomaticEvents in getInstance as belows:

...
* @param trackAutomaticEvents Whether or not to collect common mobile events
*                             include app sessions, first app opens, app updated, etc.
...
public static MixpanelAPI getInstance(Context context, String token, boolean trackAutomaticEvents)
public static MixpanelAPI getInstance(Context context, String token, boolean optOutTrackingDefault, boolean trackAutomaticEvents)
public static MixpanelAPI getInstance(Context context, String token, boolean optOutTrackingDefault, String instanceName, boolean trackAutomaticEvents)
public static MixpanelAPI getInstance(Context context, String token, JSONObject superProperties, boolean trackAutomaticEvents)
public static MixpanelAPI getInstance(Context context, String token, JSONObject superProperties, String instanceName, boolean trackAutomaticEvents)
public static MixpanelAPI getInstance(Context context, String token, boolean optOutTrackingDefault, JSONObject superProperties, String instanceName, boolean trackAutomaticEvents)

zihejia avatar Jul 13 '22 17:07 zihejia