public static void setDeviceToken(string deviceToken) { if (IsEditor()) { return; } #if UNITY_IOS AdjustiOS.SetDeviceToken(deviceToken); #elif UNITY_ANDROID AdjustAndroid.SetDeviceToken(deviceToken); #elif (UNITY_WSA || UNITY_WP8) AdjustWindows.SetDeviceToken(deviceToken); #else Debug.Log(errorMsgPlatform); #endif }
public static void setOfflineMode(bool enabled) { if (IsEditor()) { return; } #if UNITY_IOS AdjustiOS.SetOfflineMode(enabled); #elif UNITY_ANDROID AdjustAndroid.SetOfflineMode(enabled); #elif (UNITY_WSA || UNITY_WP8) AdjustWindows.SetOfflineMode(enabled); #else Debug.Log(errorMsgPlatform); #endif }
public static string getSdkVersion() { if (IsEditor()) { return(string.Empty); } #if UNITY_IOS return(AdjustiOS.GetSdkVersion()); #elif UNITY_ANDROID return(AdjustAndroid.GetSdkVersion()); #elif (UNITY_WSA || UNITY_WP8) return(AdjustWindows.GetSdkVersion()); #else Debug.Log(errorMsgPlatform); return(string.Empty); #endif }
public static AdjustAttribution getAttribution() { if (IsEditor()) { return(null); } #if UNITY_IOS return(AdjustiOS.GetAttribution()); #elif UNITY_ANDROID return(AdjustAndroid.GetAttribution()); #elif (UNITY_WSA || UNITY_WP8) return(AdjustWindows.GetAttribution()); #else Debug.Log(errorMsgPlatform); return(null); #endif }
public static bool isEnabled() { if (IsEditor()) { return(false); } #if UNITY_IOS return(AdjustiOS.IsEnabled()); #elif UNITY_ANDROID return(AdjustAndroid.IsEnabled()); #elif (UNITY_WSA || UNITY_WP8) return(AdjustWindows.IsEnabled()); #else Debug.Log(errorMsgPlatform); return(false); #endif }
public static string getIdfa() { if (IsEditor()) { return(string.Empty); } #if UNITY_IOS return(AdjustiOS.GetIdfa()); #elif UNITY_ANDROID Debug.Log("Adjust: Error! IDFA is not available on Android platform."); return(string.Empty); #elif (UNITY_WSA || UNITY_WP8) Debug.Log("Adjust: Error! IDFA is not available on Windows platform."); return(string.Empty); #else Debug.Log(errorMsgPlatform); return(string.Empty); #endif }
public static int getAppTrackingAuthorizationStatus() { if (IsEditor()) { return(-1); } #if UNITY_IOS return(AdjustiOS.GetAppTrackingAuthorizationStatus()); #elif UNITY_ANDROID Debug.Log("[Adjust]: Error! App tracking authorization status is only supported for iOS platform."); return(-1); #elif (UNITY_WSA || UNITY_WP8) Debug.Log("[Adjust]: Error! App tracking authorization status is only supported for iOS platform."); return(-1); #else Debug.Log(errorMsgPlatform); return(-1); #endif }
public static string getAdid() { if (!Application.isEditor) { #if UNITY_IOS return(AdjustiOS.GetAdid()); #elif UNITY_ANDROID return(AdjustAndroid.GetAdid()); #elif (UNITY_WSA || UNITY_WP8) return(AdjustWindows.GetAdid()); #else Debug.Log(errorMsgPlatform); return(string.Empty); #endif } else { return(string.Empty); } }
public static void trackEvent(AdjustEvent adjustEvent) { if (!Application.isEditor) { if (adjustEvent == null) { Debug.Log("Adjust: Missing event to track."); return; } #if UNITY_IOS AdjustiOS.TrackEvent(adjustEvent); #elif UNITY_ANDROID AdjustAndroid.TrackEvent(adjustEvent); #elif (UNITY_WSA || UNITY_WP8) AdjustWindows.TrackEvent(adjustEvent); #else Debug.Log(errorMsgPlatform); #endif } }
public static void requestTrackingAuthorizationWithCompletionHandler(Action <int> statusCallback, string sceneName = "Adjust") { if (IsEditor()) { return; } #if UNITY_IOS if (Adjust.authorizationStatusDelegates == null) { Adjust.authorizationStatusDelegates = new List <Action <int> >(); } Adjust.authorizationStatusDelegates.Add(statusCallback); AdjustiOS.RequestTrackingAuthorizationWithCompletionHandler(sceneName); #elif UNITY_ANDROID Debug.Log("[Adjust]: Requesting tracking authorization is only supported for iOS platform."); #elif (UNITY_WSA || UNITY_WP8) Debug.Log("[Adjust]: Requesting tracking authorization is only supported for iOS platform."); #else Debug.Log(errorMsgPlatform); #endif }