public void PostNotification(Dictionary <string, object> data, OnPostNotificationSuccess inOnPostNotificationSuccess, OnPostNotificationFailure inOnPostNotificationFailure) { postNotificationSuccessDelegate = inOnPostNotificationSuccess; postNotificationFailureDelegate = inOnPostNotificationFailure; PostNotification(data); }
public override void PostNotification(Dictionary <string, object> data, OnPostNotificationSuccess success, OnPostNotificationFailure failure) { string jsonString = Json.Serialize(data); iOS.OneSignal.PostNotificationWithJsonString(jsonString, result => success?.Invoke(NSDictToPureDict(result)), error => { if (failure != null) { Dictionary <string, object> dict; if (error.UserInfo != null && error.UserInfo["returned"] != null) { dict = NSDictToPureDict(error.UserInfo); } else { dict = new Dictionary <string, object> { { "error", "HTTP no response error" } } }; failure(dict); } }); }
public static void PostNotification(Dictionary <string, object> data, OnPostNotificationSuccess inOnPostNotificationSuccess, OnPostNotificationFailure inOnPostNotificationFailure) { #if ONESIGNAL_PLATFORM postNotificationSuccessDelegate = inOnPostNotificationSuccess; postNotificationFailureDelegate = inOnPostNotificationFailure; oneSignalPlatform.PostNotification(data); #endif }
public static void PostNotification(string jsonString, OnPostNotificationSuccess inOnPostNotificationSuccess, OnPostNotificationFailure inOnPostNotificationFailure) { #if ONESIGNAL_PLATFORM postNotificationSuccessDelegate = inOnPostNotificationSuccess; postNotificationFailureDelegate = inOnPostNotificationFailure; oneSignalPlatform.PostNotification(jsonString); #endif }
public static void PostNotification(Dictionary <string, object> data, OnPostNotificationSuccess onPostNotificationSuccessDelegate, OnPostNotificationFailure onPostNotificationFailureDelegate) { #if ONESIGNAL_PLATFORM OneSignal.onPostNotificationSuccessDelegate = onPostNotificationSuccessDelegate; OneSignal.onPostNotificationFailureDelegate = onPostNotificationFailureDelegate; oneSignalPlatform.PostNotification(data); #endif }
// Called from the native SDK private void onPostNotificationFailed(string response) { if (postNotificationFailureDelegate != null) { postNotificationFailureDelegate(Json.Deserialize(response) as Dictionary <string, object>); postNotificationFailureDelegate = null; postNotificationSuccessDelegate = null; } }
// Called from the native SDK public static void onPostNotificationFailed(Dictionary <string, object> response) { if (postNotificationFailureDelegate != null) { OnPostNotificationFailure tempPostNotificationFailureDelegate = postNotificationFailureDelegate; postNotificationFailureDelegate = null; postNotificationSuccessDelegate = null; tempPostNotificationFailureDelegate(response); } }
public void OnPostNotificationFailedCallback(Dictionary <string, object> response) { if (_postNotificationFailureDelegate != null) { OnPostNotificationFailure tempPostNotificationFailureDelegate = _postNotificationFailureDelegate; _postNotificationFailureDelegate = null; _postNotificationSuccessDelegate = null; tempPostNotificationFailureDelegate(response); } }
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 abstract void PostNotification(Dictionary <string, object> data, OnPostNotificationSuccess inOnPostNotificationSuccess, OnPostNotificationFailure inOnPostNotificationFailure);
public override void PostNotification(Dictionary <string, object> data, OnPostNotificationSuccess success, OnPostNotificationFailure failure) { Android.OneSignal.PostNotification(Json.Serialize(data), new PostNotificationResponseHandler(success, failure)); }
// Called from the native SDK private void onPostNotificationFailed(string response) { if (postNotificationFailureDelegate != null) { postNotificationFailureDelegate(Json.Deserialize(response) as Dictionary<string, object>); postNotificationFailureDelegate = null; postNotificationSuccessDelegate = null; } }
public static void PostNotification(Dictionary<string, object> data, OnPostNotificationSuccess inOnPostNotificationSuccess, OnPostNotificationFailure inOnPostNotificationFailure) { #if ONESIGNAL_PLATFORM postNotificationSuccessDelegate = inOnPostNotificationSuccess; postNotificationFailureDelegate = inOnPostNotificationFailure; oneSignalPlatform.PostNotification(data); #endif }
public PostNotificationResponseHandler(OnPostNotificationSuccess success, OnPostNotificationFailure failure) { _success = success; _failure = failure; }