RegistrationManager
RegistrationManager
Overview
1interface RegistrationManagerThe RegistrationManager interface provides methods for managing SDK registration, including contact keys, attributes, tags, and push notification settings in the Salesforce Marketing Cloud SDK.
Nested Types
Editor
1interface EditorThis class handles the setting of customer configurable values in the SDK.
RegistrationEventListener
1interface RegistrationEventListenerInterface for receiving registration-related events.
Methods
edit
1@NonNull
2abstract fun edit(): RegistrationManager.EditorReturns an instance of Editor which can be used to update the SDK’s configurable values including contact key, attributes, and tags.
Returns: An Editor instance for modifying registration values
getAttributes
1@NonNull
2abstract fun getAttributes(): Map<String, String>Getter for attributes map.
Returns: Map of attribute key-value pairs
getContactKey
1@Nullable
2abstract fun getContactKey(): StringGetter for contactKey, formerly known as SubscriberKey in the SDK.
Returns: The current contact key, or null if not set
getDeviceId
1@NonNull
2abstract fun getDeviceId(): StringGetter for the running device’s unique identifier.
Returns: The device’s unique identifier
getSignedString
1@Nullable
2abstract fun getSignedString(): StringGetter for ‘Signed String’
Returns: The signed string value, or null if not available
getSystemToken
1@Nullable
2abstract fun getSystemToken(): StringGetter for Google’s Push Notification Token
Returns: The push notification token, or null if not available
getTags
1@NonNull
2abstract fun getTags(): Set<String>Getter for tags
Returns: Set of tags associated with the registration
isPushEnabled
1abstract fun isPushEnabled(): BooleanChecks if push notifications are currently enabled for this device.
Returns: true if push is enabled, false otherwise
registerForRegistrationEvents
1abstract fun registerForRegistrationEvents(@NonNull listener: RegistrationManager.RegistrationEventListener)Register a registrationEventListener that will be notified when Registration related events happen.
Parameters:
listener- The RegistrationEventListener to register
unregisterForRegistrationEvents
1abstract fun unregisterForRegistrationEvents(@NonNull listener: RegistrationManager.RegistrationEventListener)Unregister a registrationEventListener
Parameters:
listener- The RegistrationEventListener to unregister
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!