Esempio n. 1
0
    private static string EventNameToToken(string eventName)
    {
        Dictionary <string, string> dictionary = (!AdjustHelper.IsSandboxMode()) ? AdjustHelper.ProductionEventMap : AdjustHelper.SandboxEventMap;
        string result;

        if (dictionary.TryGetValue(eventName, out result))
        {
            return(result);
        }
        return(null);
    }
Esempio n. 2
0
    public static void LogEvent(string eventName, Dictionary <string, string> dict)
    {
        if (!AdjustHelper.inited)
        {
            return;
        }
        string text = AdjustHelper.EventNameToToken(eventName);

        if (!string.IsNullOrEmpty(text))
        {
            AdjustEvent adjustEvent = new AdjustEvent(text);
            if (dict != null)
            {
                foreach (KeyValuePair <string, string> keyValuePair in dict)
                {
                    adjustEvent.addPartnerParameter(keyValuePair.Key, keyValuePair.Value);
                    adjustEvent.addCallbackParameter(keyValuePair.Key, keyValuePair.Value);
                }
            }
            Adjust.trackEvent(adjustEvent);
        }
    }
Esempio n. 3
0
 private void AdjustInit()
 {
     AdjustHelper.Init();
 }
Esempio n. 4
0
 private static void InternalAdjustLog(string eventName, Dictionary <string, string> dict)
 {
     AdjustHelper.LogEvent(eventName, dict);
 }
Esempio n. 5
0
 public static void Init()
 {
     if (AdjustHelper.inited)
     {
         return;
     }
     try
     {
         AdjustEnvironment environment  = (!AdjustHelper.IsSandboxMode()) ? AdjustEnvironment.Production : AdjustEnvironment.Sandbox;
         AdjustLogLevel    logLevel     = (!BuildConfig.LOG_ENABLED) ? AdjustLogLevel.Error : AdjustLogLevel.Verbose;
         AdjustConfig      adjustConfig = new AdjustConfig("6652dk67rxj4", environment);
         adjustConfig.setLogLevel(logLevel);
         AdjustConfig adjustConfig2 = adjustConfig;
         if (AdjustHelper.__f__mg_cache0 == null)
         {
             AdjustHelper.__f__mg_cache0 = new Action <string>(FMLogger.vCore);
         }
         adjustConfig2.setLogDelegate(AdjustHelper.__f__mg_cache0);
         adjustConfig.setEventBufferingEnabled(true);
         adjustConfig.setLaunchDeferredDeeplink(true);
         AdjustConfig adjustConfig3 = adjustConfig;
         if (AdjustHelper.__f__mg_cache1 == null)
         {
             AdjustHelper.__f__mg_cache1 = new Action <AdjustEventSuccess>(AdjustHelper.EventSuccessCallback);
         }
         adjustConfig3.setEventSuccessDelegate(AdjustHelper.__f__mg_cache1, "Adjust");
         AdjustConfig adjustConfig4 = adjustConfig;
         if (AdjustHelper.__f__mg_cache2 == null)
         {
             AdjustHelper.__f__mg_cache2 = new Action <AdjustEventFailure>(AdjustHelper.EventFailureCallback);
         }
         adjustConfig4.setEventFailureDelegate(AdjustHelper.__f__mg_cache2, "Adjust");
         AdjustConfig adjustConfig5 = adjustConfig;
         if (AdjustHelper.__f__mg_cache3 == null)
         {
             AdjustHelper.__f__mg_cache3 = new Action <AdjustSessionSuccess>(AdjustHelper.SessionSuccessCallback);
         }
         adjustConfig5.setSessionSuccessDelegate(AdjustHelper.__f__mg_cache3, "Adjust");
         AdjustConfig adjustConfig6 = adjustConfig;
         if (AdjustHelper.__f__mg_cache4 == null)
         {
             AdjustHelper.__f__mg_cache4 = new Action <AdjustSessionFailure>(AdjustHelper.SessionFailureCallback);
         }
         adjustConfig6.setSessionFailureDelegate(AdjustHelper.__f__mg_cache4, "Adjust");
         AdjustConfig adjustConfig7 = adjustConfig;
         if (AdjustHelper.__f__mg_cache5 == null)
         {
             AdjustHelper.__f__mg_cache5 = new Action <string>(AdjustHelper.DeferredDeeplinkCallback);
         }
         adjustConfig7.setDeferredDeeplinkDelegate(AdjustHelper.__f__mg_cache5, "Adjust");
         AdjustConfig adjustConfig8 = adjustConfig;
         if (AdjustHelper.__f__mg_cache6 == null)
         {
             AdjustHelper.__f__mg_cache6 = new Action <AdjustAttribution>(AdjustHelper.AttributionChangedCallback);
         }
         adjustConfig8.setAttributionChangedDelegate(AdjustHelper.__f__mg_cache6, "Adjust");
         Adjust.start(adjustConfig);
         AdjustHelper.inited = true;
     }
     catch (Exception ex)
     {
         AdjustHelper.inited = false;
         FMLogger.vCore("Adjust init error. " + ex.Message);
     }
 }
Esempio n. 6
0
    public static void SetUninstallToken(byte[] bytes)
    {
        string uninstallToken = BitConverter.ToString(bytes).Replace("-", string.Empty);

        AdjustHelper.SetUninstallToken(uninstallToken);
    }