-
Notifications
You must be signed in to change notification settings - Fork 0
Low level API access
The SDK exposes the low-level communication interface with the method getSession() in the NinchatSession class. The host app may use this object to communicate to the server, bypassing the SDK logic.
Furthermore, the host application can register itself (or its property/properties) as a listener to the low-level API events and/or logs by creating the NinchatSession instance with the listeners as constructor arguments:
session = new NinchatSession(applicationContext, configurationKey, sessionCredentials, eventListener);
session = new NinchatSession(applicationContext, configurationKey, sessionCredentials, preferredEnvironments, eventListener);
session = new NinchatSession(applicationContext, configurationKey, sessionCredentials, logListener);
session = new NinchatSession(applicationContext, configurationKey, sessionCredentials, preferredEnvironments, logListener);
session = new NinchatSession(applicationContext, configurationKey, sessionCredentials, eventListener, logListener);
session = new NinchatSession(applicationContext, configurationKey, sessionCredentials, preferredEnvironments, eventListener, logListener);
session = new NinchatSession(applicationContext, configurationKey, sessionCredentials, ninchatConfiguration);
session = new NinchatSession(applicationContext, configurationKey, sessionCredentials, ninchatConfiguration, preferredEnvironments);
session = new NinchatSession(applicationContext, configurationKey, sessionCredentials, ninchatConfiguration, eventListener);
session = new NinchatSession(applicationContext, configurationKey, sessionCredentials, ninchatConfiguration, logListener);
session = new NinchatSession(applicationContext, configurationKey, sessionCredentials, ninchatConfiguration, preferredEnvironments, eventListener);
session = new NinchatSession(applicationContext, configurationKey, sessionCredentials, ninchatConfiguration, preferredEnvironments, logListener);
session = new NinchatSession(applicationContext, configurationKey, sessionCredentials, ninchatConfiguration, eventListener, logListener);
session = new NinchatSession(applicationContext, configurationKey, sessionCredentials, ninchatConfiguration, preferredEnvironments, eventListener, logListener);
The argument eventListener, when non-null, must be an instance of the NinchatSDKEventListener class, the logListener an instance of the NinchatSDKLogListenerinterface, and ninchatConfiguration is an instance of NinchatConfiguration class.
As of version 0.5.0 sessionCredentials can be added to open up a previous session. Passing null will open a new session. Passing invalid/outdated sessionCredentials will cause onSessionInitFailed to be invoked.
As of version 0.6.0 aforementioned NinchatSession constructors are deprecated and a builder pattern has been introduced. NinchatSession object needs to be initialized the following way:
NinchatSession.Builder builder = new NinchatSession.Builder(applicationContext, configurationKey);
builder.setSessionCredentials(sessionCredentials); // optional
builder.setConfiguration(ninchatConfiguration); // optional
builder.setPreferredEnvironments(preferredEnvironments); // optional
builder.setEventListener(eventListener); // optional
builder.setLogListener(logListener); // optional
NinchatSession session = builder.create();
See Ninchat API Reference for information about the API's outbound Actions and inbound Events.
- Home
- Installation
- SDK Permission
- How to integrate the SDK
-
Overriding SDK assets
- Old resources doc ( < SDK 0.10.0 )
- Queue list view
- In Queue view element
- Command / Chat view elements
- Review / Rating view
- Dialogue(s)
- Titlebar
- Questionnaire
- Buttons
- Example Integration
- Building the Go library
- Building SDK .aar
- Contact Us
- Licenses