Skip to content

Commit b392edc

Browse files
committed
Add push subscription changed event example
1 parent 56e1f37 commit b392edc

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

MIGRATION_GUIDE_v3_to_v5.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ To resume receiving of push notifications (driving the native permission prompt
119119

120120
pushSubscription.OptIn();
121121

122+
To observe changes to the push subscription you can add a custom method to the event:
123+
124+
OneSignal.User.PushSubscription.Changed += yourOnPushSubscriptionChangedMethod;
125+
126+
public void yourOnPushSubscriptionChangedMethod(object sender, PushSubscriptionChangedEventArgs e) {
127+
...
128+
}
122129

123130
**Email/SMS Subscriptions**
124131
Email and/or SMS subscriptions can be added or removed via:

OneSignalExample/Assets/OneSignal/MIGRATION_GUIDE_v3_to_v5.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ To resume receiving of push notifications (driving the native permission prompt
119119

120120
pushSubscription.OptIn();
121121

122+
To observe changes to the push subscription you can add a custom method to the event:
123+
124+
OneSignal.User.PushSubscription.Changed += yourOnPushSubscriptionChangedMethod;
125+
126+
public void yourOnPushSubscriptionChangedMethod(object sender, PushSubscriptionChangedEventArgs e) {
127+
...
128+
}
122129

123130
**Email/SMS Subscriptions**
124131
Email and/or SMS subscriptions can be added or removed via:

0 commit comments

Comments
 (0)