Skip to content

Commit e48d50b

Browse files
nan-lijinliu9508
authored andcommitted
Update Migration Guide with ID getters and observer
1 parent 88d7e31 commit e48d50b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

MIGRATION_GUIDE.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,12 @@ The user name space is accessible via `OneSignal.User` (in Kotlin) or `OneSignal
259259
| `val pushSubscription: IPushSubscription` | `IPushSubscription getPushSubscription()` | *The push subscription associated to the current user.* |
260260
| `fun setLanguage(value: String)` | `void setLanguage(String value)` | *Set the 2-character language either as a detected language or explicitly set for this user.* |
261261
| `fun pushSubscription.addChangeHandler(handler: ISubscriptionChangedHandler)` | `void pushSubscription.addChangeHandler(ISubscriptionChangedHandler handler)` | *Adds a change handler that will run whenever the push subscription has been changed.* |
262+
| `val onesignalId: String` | `String getOnesignalId()` | *Returns the OneSignal ID for the current user, which can be the empty string if it is not yet available.* |
263+
| `val externalId: String` | `String getExternalId()` | *Returns the external ID for the current user, which can be the empty string if not set.* |
264+
| `fun addObserver(observer: IUserStateObserver)` | `void addObserve(IUserStateObserver observer)` | *The `IUserStateObserver.onUserStateChange` method will be fired on the passed-in object when the user state changes. The User State contains the onesignalId and externalId (which can be empty strings), and the observer will be fired when these values change.* |
265+
| `fun removeObserver(observer: IUserStateObserver)` | `void removeObserver(IUserStateObserver observer)` | *Remove a user state observer that has been previously added.* |
262266
| `fun addAlias(label: String, id: String)` | `void addAlias(String label, String id)` | *Set an alias for the current user. If this alias already exists it will be overwritten.* |
263-
| `fun addAliases(aliases: Map<String, String>)` | `void addAliases(Map<String, String> aliases)` | S*et aliases for the current user. If any alias already exists it will be overwritten.* |
267+
| `fun addAliases(aliases: Map<String, String>)` | `void addAliases(Map<String, String> aliases)` | *Set aliases for the current user. If any alias already exists it will be overwritten.* |
264268
| `fun removeAlias(label: String)` | `void removeAlias(String label)` | *Remove an alias from the current user.* |
265269
| `fun removeAliases(labels: Collection<String>)` | `void removeAliases(Collection<String> labels)` | *Remove multiple aliases from the current user.* |
266270
| `fun addEmail(email: String)` | `void addEmail(String email)` | *Add a new email subscription to the current user.* |

0 commit comments

Comments
 (0)