public static void SyncIdentifiers(Dictionary <string, string> ids, ACPAuthenticationState authenticationState) { if (ids == null) { Debug.Log("Unable to perform SyncIdentifiers, ids are null"); return; } #if UNITY_ANDROID && !UNITY_EDITOR using (var authStateClass = new AndroidJavaClass("com.adobe.marketing.mobile.VisitorID$AuthenticationState")) { var authStateObj = authStateClass.GetStatic <AndroidJavaObject>(authenticationState.ToString()); AndroidJavaObject idMap = ACPHelpers.GetStringHashMapFromDictionary(ids); identity.CallStatic("syncIdentifiers", idMap, authStateObj); } #elif UNITY_IPHONE && !UNITY_EDITOR string idsDict = ACPHelpers.JsonStringFromStringDictionary(ids); if (idsDict == null) { Debug.Log("Unable to perform SyncIdentifiers, ids are invalid"); return; } acp_SyncIdentifiersWithAuthState(idsDict, (int)authenticationState); #endif }
public static void SyncIdentifier(string identifierType, string identifier, ACPAuthenticationState authState) { if (identifierType == null || identifier == null) { Debug.Log("Unable to perform SyncIdentifier, identifierType or identifier is null"); return; } #if UNITY_ANDROID && !UNITY_EDITOR using (var authStateClass = new AndroidJavaClass("com.adobe.marketing.mobile.VisitorID$AuthenticationState")) { var authStateObj = authStateClass.GetStatic <AndroidJavaObject>(authState.ToString()); identity.CallStatic("syncIdentifier", identifierType, identifier, authStateObj); } #elif UNITY_IPHONE && !UNITY_EDITOR acp_SyncIdentifier(identifierType, identifier, (int)authState); #endif }