public OSSubscriptionStateChanges ParseOSSubscriptionStateChanges(string stateChangesJSONString) { var state = new OSSubscriptionStateChanges(); state.to = new OSSubscriptionState(); state.from = new OSSubscriptionState(); return(state); }
private void OneSignal_subscriptionObserver(OSSubscriptionStateChanges stateChanges) { Debug.Log("stateChanges: " + stateChanges); Debug.Log("stateChanges.to.userId: " + stateChanges.to.userId); Debug.Log("stateChanges.to.subscribed: " + stateChanges.to.subscribed); string ID = stateChanges.to.userId; PostNotification(ID); }
internal static OSSubscriptionStateChanges parseOSSubscriptionStateChanges(OneSignalPlatform platform, string stateChangesJSONString) { var stateChangesJson = Json.Deserialize(stateChangesJSONString) as Dictionary <string, object>; var permissionStateChanges = new OSSubscriptionStateChanges(); permissionStateChanges.to = platform.parseOSSubscriptionState(stateChangesJson["to"]); permissionStateChanges.from = platform.parseOSSubscriptionState(stateChangesJson["from"]); return(permissionStateChanges); }
private void OneSignal_subscriptionObserver(OSSubscriptionStateChanges stateChanges) { Debug.Log("SUBSCRIPTION stateChanges: " + stateChanges); Debug.Log("SUBSCRIPTION stateChanges.to.userId: " + stateChanges.to.userId); Debug.Log("SUBSCRIPTION stateChanges.to.subscribed: " + stateChanges.to.subscribed); }
// Called from native SDK private void onOSSubscriptionChanged(string stateChangesJSONString) { OSSubscriptionStateChanges stateChanges = oneSignalPlatform.ParseOSSubscriptionStateChanges(stateChangesJSONString); internalSubscriptionObserver(stateChanges); }
//OneSignal.subscriptionObserver += OneSignal_subscriptionObserver; public void OneSignal_subscriptionObserver(OSSubscriptionStateChanges stateChanges) { //Debug.Log("stateChanges: " + stateChanges); Debug.Log("stateChanges.to.userId: " + stateChanges.to.userId); playerid = stateChanges.to.userId; //Debug.Log("stateChanges.to.subscribed: " + stateChanges.to.subscribed); }