-
public class Messaging.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static Messaging.Companion
INSTANCE
-
Method Summary
Modifier and Type Method Description final Unit
initialize(Context context, String channelKey, SuccessCallback<Messaging> successCallback, FailureCallback<MessagingError> failureCallback)
Initializes Messaging for the given channelKey, calling successCallback if the initialization completes successfully and failureCallback if it fails. final Messaging
instance()
Retrieves the current instance of Messaging. final Unit
invalidate()
Invalidates the current instance of Messaging. final Unit
setDelegate(MessagingDelegate messagingDelegate)
Sets the MessagingDelegate that should be used by Messaging. -
-
Method Detail
-
initialize
@Deprecated(message = Please use Zendesk.initialize instead, replaceWith = @ReplaceWith(imports = {zendesk.android.Zendesk}, expression = Zendesk.initialize(context, channelKey, successCallback, failureCallback, DefaultMessagingFactory()))) final Unit initialize(Context context, String channelKey, SuccessCallback<Messaging> successCallback, FailureCallback<MessagingError> failureCallback)
Initializes Messaging for the given channelKey, calling successCallback if the initialization completes successfully and failureCallback if it fails.
After a successful call to initialize, calling it again will simply call successCallback immediately.
This function is synchronized and won't run concurrently if called more than once at the same time.
- Parameters:
context
- an instance of Context.channelKey
- the key of your Messaging for Android channelsuccessCallback
- an implementation of SuccessCallback to be notified of a successful resultfailureCallback
- an implementation of FailureCallback to be notified of a failure
-
instance
@Deprecated(message = Please use Zendesk#messaging instead, replaceWith = @ReplaceWith(imports = {zendesk.android.Zendesk}, expression = Zendesk.instance().messaging())) final Messaging instance()
Retrieves the current instance of Messaging.
If Messaging.initialize was not called or haven't completed yet, this method will return a stubbed version of Messaging that will only output logs when any of its methods are called.
-
invalidate
@Deprecated(message = Please use Zendesk.invalidate instead, replaceWith = @ReplaceWith(imports = {zendesk.android.Zendesk}, expression = Zendesk.invalidate())) final Unit invalidate()
Invalidates the current instance of Messaging.
After calling this method you will have to call Messaging.initialize again if you would like to use Messaging.
-
setDelegate
@Deprecated(message = Please use Messaging.setDelegate, replaceWith = @ReplaceWith(imports = {zendesk.android.messaging.Messaging}, expression = Messaging.setDelegate(messagingDelegate))) final Unit setDelegate(MessagingDelegate messagingDelegate)
Sets the MessagingDelegate that should be used by Messaging.
- Parameters:
messagingDelegate
- an implementation of MessagingDelegate, or null if you want to remove one that was previously set
-
-
-
-