public override void ActivateWithConfiguration(YandexAppMetricaConfig config) { base.ActivateWithConfiguration(config); using (var activityClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) { var playerActivityContext = activityClass.GetStatic <AndroidJavaObject> ("currentActivity"); metricaClass.CallStatic("activate", playerActivityContext, config.ToAndroidAppMetricaConfig()); } }
public void ProcessConfigurationUpdate(YandexAppMetricaConfig config) { var androidAppMetricaConfig = config.ToAndroidAppMetricaConfig(); if (androidAppMetricaConfig != null) { metricaConfigStorage.Call("saveConfig", androidAppMetricaConfig); } }