public static void SendOutcomeWithValue(string name, float value, OnSendOutcomeSuccess onSendOutcomeSuccess) { #if ONESIGNAL_PLATFORM string delegateGuid = OneSignalUnityUtils.GetNewGuid(); delegates.Add(delegateGuid, onSendOutcomeSuccess); oneSignalPlatform.SendOutcomeWithValue(delegateGuid, name, value); #endif }
// Call this if you need the playerId and/or pushToken // NOTE: pushToken maybe null if notifications are not accepted or there is connectivity issues. public static void IdsAvailable(IdsAvailableCallback inIdsAvailableDelegate) { #if ONESIGNAL_PLATFORM string delegateGuid = OneSignalUnityUtils.GetNewGuid(); delegates.Add(delegateGuid, inIdsAvailableDelegate); oneSignalPlatform.IdsAvailable(delegateGuid); #endif }
// Makes a request to onesignal.com to get current tags set on the player and then run the callback passed in. public static void GetTags(TagsReceived inTagsReceivedDelegate) { #if ONESIGNAL_PLATFORM string delegateGuid = OneSignalUnityUtils.GetNewGuid(); delegates.Add(delegateGuid, inTagsReceivedDelegate); oneSignalPlatform.GetTags(delegateGuid); #endif }
public static void PostNotification(Dictionary <string, object> data, OnPostNotificationSuccess inOnPostNotificationSuccess, OnPostNotificationFailure inOnPostNotificationFailure) { #if ONESIGNAL_PLATFORM string delegateGuidSuccess = OneSignalUnityUtils.GetNewGuid(); string delegateGuidFailure = OneSignalUnityUtils.GetNewGuid(); delegates.Add(delegateGuidSuccess, inOnPostNotificationSuccess); delegates.Add(delegateGuidFailure, inOnPostNotificationFailure); oneSignalPlatform.PostNotification(delegateGuidSuccess, delegateGuidFailure, data); #endif }
public static void LogoutEmail(OnLogoutEmailSuccess successDelegate, OnLogoutEmailFailure failureDelegate) { #if ONESIGNAL_PLATFORM string delegateGuidSuccess = OneSignalUnityUtils.GetNewGuid(); string delegateGuidFailure = OneSignalUnityUtils.GetNewGuid(); delegates.Add(delegateGuidSuccess, successDelegate); delegates.Add(delegateGuidFailure, failureDelegate); oneSignalPlatform.LogoutEmail(delegateGuidSuccess, delegateGuidFailure); #endif }
public static void SetEmail(string email, string emailAuthToken, OnSetEmailSuccess successDelegate, OnSetEmailFailure failureDelegate) { #if ONESIGNAL_PLATFORM string delegateGuidSuccess = OneSignalUnityUtils.GetNewGuid(); string delegateGuidFailure = OneSignalUnityUtils.GetNewGuid(); delegates.Add(delegateGuidSuccess, successDelegate); delegates.Add(delegateGuidFailure, failureDelegate); oneSignalPlatform.SetEmail(delegateGuidSuccess, delegateGuidFailure, email, emailAuthToken); #endif }