-
public class Zendesk.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private final Zendeskinstancepublic final static Zendesk.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final Unitinitialize(Context context, String channelKey, SuccessCallback<Zendesk> successCallback, FailureCallback<Throwable> failureCallback, MessagingFactory messagingFactory)Initializes Zendesk for the given channelKey, calling successCallback if the initialization completes successfully and failureCallback if it fails. final Unitinitialize(Context context, String channelKey, SuccessCallback<Zendesk> successCallback, FailureCallback<Throwable> failureCallback)Initializes Zendesk for the given channelKey, calling successCallback if the initialization completes successfully and failureCallback if it fails. final Unitinvalidate()Invalidates the current instance of Zendesk. final ZendeskgetInstance()-
-
Method Detail
-
initialize
@JvmOverloads() final Unit initialize(Context context, String channelKey, SuccessCallback<Zendesk> successCallback, FailureCallback<Throwable> failureCallback, MessagingFactory messagingFactory)
Initializes Zendesk for the given channelKey, calling successCallback if the initialization completes successfully and failureCallback if it fails. if a messagingFactory was provided an instance of Messaging will be created.
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 failuremessagingFactory- optional instance of MessagingFactory used to create instances of Messaging
-
initialize
@JvmOverloads() final Unit initialize(Context context, String channelKey, SuccessCallback<Zendesk> successCallback, FailureCallback<Throwable> failureCallback)
Initializes Zendesk for the given channelKey, calling successCallback if the initialization completes successfully and failureCallback if it fails. if a messagingFactory was provided an instance of Messaging will be created.
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
-
invalidate
final Unit invalidate()
Invalidates the current instance of Zendesk.
After calling this method you will have to call Zendesk.initialize again if you would like to use Zendesk.
-
getInstance
final Zendesk getInstance()
-
-
-
-