public static void setUserEmails(EmailCryptType cryptType, params string[] userEmails) { AndroidJavaClass emailsCryptTypeEnum = new AndroidJavaClass("com.appsflyer.AppsFlyerProperties$EmailsCryptType"); AndroidJavaObject emailsCryptType; switch (cryptType) { case EmailCryptType.EmailCryptTypeSHA1: emailsCryptType = emailsCryptTypeEnum.GetStatic <AndroidJavaObject>("SHA1"); break; case EmailCryptType.EmailCryptTypeMD5: emailsCryptType = emailsCryptTypeEnum.GetStatic <AndroidJavaObject>("MD5"); break; case EmailCryptType.EmailCryptTypeSHA256: emailsCryptType = emailsCryptTypeEnum.GetStatic <AndroidJavaObject>("SHA256"); break; default: emailsCryptType = emailsCryptTypeEnum.GetStatic <AndroidJavaObject>("NONE"); break; } cls_AppsFlyer.Call("setUserEmails", emailsCryptType, (object)userEmails); }
/// <summary> /// Set the user emails and encrypt them. /// cryptMethod Encryption method: /// EmailCryptType.EmailCryptTypeMD5 /// EmailCryptType.EmailCryptTypeSHA1 /// EmailCryptType.EmailCryptTypeSHA256 /// EmailCryptType.EmailCryptTypeNone /// </summary> /// <param name="cryptMethod">Encryption method.</param> /// <param name="emails">User emails.</param> public static void setUserEmails(EmailCryptType cryptMethod, params string[] emails) { #if UNITY_IOS && !UNITY_EDITOR AppsFlyeriOS.setUserEmails(cryptMethod, emails.Length, emails); #elif UNITY_ANDROID && !UNITY_EDITOR AppsFlyerAndroid.setUserEmails(cryptMethod, emails); #else #endif }
/// <summary> /// Internal Helper Method. /// </summary> private static AndroidJavaObject getEmailType(EmailCryptType cryptType) { AndroidJavaClass emailsCryptTypeEnum = new AndroidJavaClass("com.appsflyer.AppsFlyerProperties$EmailsCryptType"); AndroidJavaObject emailsCryptType; switch (cryptType) { case EmailCryptType.EmailCryptTypeSHA256: emailsCryptType = emailsCryptTypeEnum.GetStatic <AndroidJavaObject>("SHA256"); break; default: emailsCryptType = emailsCryptTypeEnum.GetStatic <AndroidJavaObject>("NONE"); break; } return(emailsCryptType); }
/// <summary> /// Set the user emails and encrypt them. /// cryptMethod Encryption method: /// EmailCryptType.EmailCryptTypeMD5 /// EmailCryptType.EmailCryptTypeSHA1 /// EmailCryptType.EmailCryptTypeSHA256 /// EmailCryptType.EmailCryptTypeNone /// </summary> /// <param name="cryptMethod">Encryption method.</param> /// <param name="emails">User emails.</param> public static void setUserEmails(EmailCryptType cryptMethod, params string[] emails) { #if !UNITY_EDITOR appsFlyerAndroid.CallStatic("setUserEmails", getEmailType(cryptMethod), (object)emails); #endif }
private static extern void _setUserEmails(EmailCryptType cryptType, int length, params string[] userEmails);
/// <summary> /// Set the user emails and encrypt them. /// cryptMethod Encryption method: /// EmailCryptType.EmailCryptTypeMD5 /// EmailCryptType.EmailCryptTypeSHA1 /// EmailCryptType.EmailCryptTypeSHA256 /// EmailCryptType.EmailCryptTypeNone /// </summary> /// <param name="cryptType">type Hash algoritm.</param> /// <param name="length">length of userEmails array.</param> /// <param name="userEmails">userEmails The list of strings that hold mails.</param> public static void setUserEmails(EmailCryptType cryptType, int length, params string[] userEmails) { #if !UNITY_EDITOR _setUserEmails(cryptType, length, userEmails); #endif }
public static extern void mSetUserEmails(EmailCryptType cryptType, int length, params string[] userEmails);
public static void setUserEmails(EmailCryptType cryptType, params string[] userEmails) { }
public static void setUserEmails(EmailCryptType cryptType, params string[] userEmails) { mSetUserEmails(cryptType, userEmails.Length, userEmails); }