Exemplo n.º 1
0
 public void SetAttribute(UserFromAttributeData data)
 {
     if (data != null)
     {
         fromCode      = data.fromCode;
         fromParam     = data.fromParam;
         fromAffiliate = data.fromAffiliate;
     }
 }
Exemplo n.º 2
0
    public static UserFromAttributeData GetInstallReferrer()
    {
        //IL_000f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0014: Expected O, but got Unknown
        try
        {
            AndroidJavaClass      val = new AndroidJavaClass(Property.BundleIdentifier + ".AppHelper");
            UserFromAttributeData userFromAttributeData = new UserFromAttributeData();
            string text = val.CallStatic <string>("GetInstallReferrerAtInstall", new object[0]);
            Debug.Log((object)("Selected Referrer:" + text));
            if (text.Contains("&"))
            {
                string[] array  = text.Split('&');
                string[] array2 = array;
                foreach (string text2 in array2)
                {
                    if (text2.Contains("="))
                    {
                        Debug.LogError((object)text2);
                        string[] array3 = text2.Split('=');
                        if (array3.Length == 2)
                        {
                            if (array3[0] == "a")
                            {
                                userFromAttributeData.fromAffiliate = array3[1];
                            }
                            if (array3[0] == "p")
                            {
                                userFromAttributeData.fromParam = array3[1];
                            }
                            if (array3[0] == "c")
                            {
                                userFromAttributeData.fromCode = array3[1];
                            }
                        }
                    }
                }
            }
            return(userFromAttributeData);

            IL_0117 :;
        }
        catch (Exception ex)
        {
            Debug.LogError((object)ex);
        }
        return(null);
    }