From 3b89ac5d3e058912cd1329f799b6f74744f30600 Mon Sep 17 00:00:00 2001 From: jinliu9508 Date: Wed, 13 Dec 2023 12:01:00 -0500 Subject: [PATCH] Update comments to better explain the IDs --- .../src/main/java/com/onesignal/user/IUserManager.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/user/IUserManager.kt b/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/user/IUserManager.kt index 850bc5567f..2b71ca11de 100644 --- a/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/user/IUserManager.kt +++ b/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/user/IUserManager.kt @@ -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 @@ -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)