Skip to content

Commit 88d7e31

Browse files
committed
Update comments to better explain the IDs
1 parent 8f8e25d commit 88d7e31

File tree

1 file changed

+8
-2
lines changed
  • OneSignalSDK/onesignal/core/src/main/java/com/onesignal/user

1 file changed

+8
-2
lines changed

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/user/IUserManager.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ interface IUserManager {
2727
val pushSubscription: IPushSubscription
2828

2929
/**
30-
* onesignalId, empty if this is current unavailable
30+
* The UUID generated by OneSignal to represent a user, empty if this is currently unavailable
3131
*/
3232
val onesignalId: String
3333

3434
/**
35-
* externalId, empty if this is current unavailable
35+
* The External ID is OneSignal's default and recommended alias label. This should be the main
36+
* identifier you use to identify users. It is set when calling the [OneSignal.login] method.
37+
*
38+
* This is empty if the External ID has not been set.
3639
*/
3740
val externalId: String
3841

@@ -153,6 +156,9 @@ interface IUserManager {
153156
/**
154157
* Add an observer to the user state, allowing the provider to be
155158
* notified whenever the user state has changed.
159+
*
160+
* Important: When using the observer to retrieve the onesignalId, check the externalId as well
161+
* to confirm the values are associated with the expected user.
156162
*/
157163
fun addObserver(observer: IUserStateObserver)
158164

0 commit comments

Comments
 (0)