You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MIGRATION_GUIDE.md
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -259,8 +259,12 @@ The user name space is accessible via `OneSignal.User` (in Kotlin) or `OneSignal
259
259
|`val pushSubscription: IPushSubscription`|`IPushSubscription getPushSubscription()`|*The push subscription associated to the current user.*|
260
260
|`fun setLanguage(value: String)`|`void setLanguage(String value)`|*Set the 2-character language either as a detected language or explicitly set for this user.*|
261
261
|`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.*|
262
266
|`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.*|
264
268
|`fun removeAlias(label: String)`|`void removeAlias(String label)`|*Remove an alias from the current user.*|
265
269
|`fun removeAliases(labels: Collection<String>)`|`void removeAliases(Collection<String> labels)`|*Remove multiple aliases from the current user.*|
266
270
|`fun addEmail(email: String)`|`void addEmail(String email)`|*Add a new email subscription to the current user.*|
0 commit comments