public static void ApplyAuthCode(string countryCode, string mobile, TalkingDataAuthCodeType type, string accountName, string smsId) { // Call plugin only when running on real device if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor) { #if UNITY_IPHONE tdEAuthApplyAuthCode(countryCode, mobile, type, accountName, smsId); #endif #if UNITY_ANDROID AndroidJavaClass tdEAuthClass = new AndroidJavaClass("com.tendcloud.tenddata.unityplugin.TalkingDataEAuthPlugin"); AndroidJavaClass enumClass = new AndroidJavaClass("com.tendcloud.tenddata.TalkingDataEAuth$TDAuthCodeType"); AndroidJavaObject typeObj = enumClass.CallStatic <AndroidJavaObject>("valueOf", type.ToString()); tdEAuthClass.CallStatic("applyAuthCode", countryCode, mobile, accountName, typeObj); #endif } }
private static extern void tdEAuthReapplyAuthCode(string countryCode, string mobile, TalkingDataAuthCodeType type, string accountName, string smsId, string requestId);