Package 

Interface Messaging


  • 
    public interface Messaging
    
                        

    Public entry point of the SDK. To use Messaging out of the box you must call Messaging.initialize first and once SuccessCallback is called the SDK instance will be available through Messaging.instance.

    Messaging.initialize(
        context = context,
        channelKey = "{your-channel-key}",
        successCallback = {
            // The initialization was successful
        },
        failureCallback = { cause ->
            // The initialization failed and "cause" is an optional "MessagingError"
        }
    )

    After Messaging.initialize completes successfully, calling Messaging.instance will return an instance of Messaging which you can use to perform SDK actions such as showing the conversation screen.

    Messaging.instance().showMessaging(context)

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class Companion
    • Method Summary

      Modifier and Type Method Description
      abstract Unit showMessaging(Context context) Given the context, starts the ConversationActivity immediately.
      abstract Unit showMessaging(Context context, Integer intentFlags) Given the context and intentFlags, starts the ConversationActivity immediately.
      • Methods inherited from class zendesk.messaging.android.Messaging

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • showMessaging

         abstract Unit showMessaging(Context context)

        Given the context, starts the ConversationActivity immediately.

        Parameters:
        context - the Context to start the activity
      • showMessaging

         abstract Unit showMessaging(Context context, Integer intentFlags)

        Given the context and intentFlags, starts the ConversationActivity immediately.

        Parameters:
        context - the Context to start the activity
        intentFlags - special flags controlling how the intent to start the ConversationActivity is handled, 0 by default