/** * By default, if the MixpanelAPI cannot contact the API server over HTTPS, it will attempt to * contact the server via regular HTTP. To disable this behavior, call * enableFallbackServer(context, false) * * @param context the execution context associated with this context. * @param enableIfTrue if true, the library will fall back to using http when https is * unavailable. */ public static void enableFallbackServer(Context context, boolean enableIfTrue) { AnalyticsMessages msgs = AnalyticsMessages.getInstance(context); if (enableIfTrue) msgs.setFallbackHost(MPConfig.FALLBACK_ENDPOINT); else msgs.setFallbackHost(null); }