Skip to content

Commit

Permalink
Update comments to better explain the IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
jinliu9508 committed Dec 13, 2023
1 parent 0664cbb commit 3b89ac5
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@ interface IUserManager {
val pushSubscription: IPushSubscription

/**
* onesignalId, empty if this is current unavailable
* The UUID generated by OneSignal to represent a user, empty if this is currently unavailable
*/
val onesignalId: String

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

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

Expand Down

0 comments on commit 3b89ac5

Please sign in to comment.