internal static OSEmailSubscriptionStateChanges parseOSEmailSubscriptionStateChanges(OneSignalPlatform platform, string stateChangesJSONString) { var stateChangesJson = Json.Deserialize(stateChangesJSONString) as Dictionary <string, object>; var emailStateChanges = new OSEmailSubscriptionStateChanges(); emailStateChanges.to = platform.parseOSEmailSubscriptionState(stateChangesJson ["to"]); emailStateChanges.from = platform.parseOSEmailSubscriptionState(stateChangesJson ["from"]); return(emailStateChanges); }
private void OneSignal_emailSubscriptionObserver(OSEmailSubscriptionStateChanges stateChanges) { Debug.Log("EMAIL stateChanges.from.status: " + stateChanges.from.emailUserId + ", " + stateChanges.from.emailAddress); Debug.Log("EMAIL stateChanges.to.status: " + stateChanges.to.emailUserId + ", " + stateChanges.to.emailAddress); }
// Called from native SDK private void onOSEmailSubscriptionChanged(string stateChangesJSONString) { OSEmailSubscriptionStateChanges stateChanges = oneSignalPlatform.ParseOSEmailSubscriptionStateChanges(stateChangesJSONString); internalEmailSubscriptionObserver(stateChanges); }