public static void Init(string apiKey, bool captureUncaughtExceptions = false) { FlurryAnalyticsAndroid.DebugLog(string.Concat(new object[] { "Init with key: ", apiKey, " capture exceptions: ", captureUncaughtExceptions })); if (!FlurryAnalyticsAndroid.IsAndroidPlayer()) { return; } if (apiKey != null) { apiKey = apiKey.ToUpper(); } if (string.IsNullOrEmpty(apiKey)) { FlurryAnalyticsAndroid.DebugLogError("Android API key is null or empty, please provide valid API key"); } using (AndroidJavaClass androidJavaClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) { using (AndroidJavaObject @static = androidJavaClass.GetStatic <AndroidJavaObject>("currentActivity")) { FlurryAnalyticsAndroid.Flurry.CallStatic("setCaptureUncaughtExceptions", new object[] { captureUncaughtExceptions }); FlurryAnalyticsAndroid.Flurry.CallStatic("init", new object[] { @static, apiKey.ToUpper() }); } } }