Beispiel #1
0
    public OSSubscriptionStateChanges ParseOSSubscriptionStateChanges(string stateChangesJSONString)
    {
        var state = new OSSubscriptionStateChanges();

        state.to   = new OSSubscriptionState();
        state.from = new OSSubscriptionState();
        return(state);
    }
Beispiel #2
0
    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);
    }
Beispiel #3
0
    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);
    }
Beispiel #4
0
 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);
    }
Beispiel #6
0
    //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);
    }