Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

NowChatSDK class- Android

The NowChatService class provides the function necessary to create a NowChatService that interacts with NowChat. NowChat provides the ability to embed Live Agent and Virtual Agent within your application.

For additional information on Live Agent and Virtual Agent, see Virtual Agent.

Parent Topic:Mobile SDK - Android

NowChatSDK - makeChatService(instanceURL: URL, nowChatSdkCallbacks)

Creates a NowChat service. This is a suspend function.

NameTypeDescription
instanceURLURLURL of the ServiceNow instance that the NowChatService should interact with.
nowChatSdkCallbacksNowChatSdkCallbacksCallbacks for the host application to use to configure the NowChatService.
TypeDescription
None 
@Inject lateinit var sdkSettingsProvider: Provider<NowSDKSettings>
@Inject lateinit var chatCallbacks: SampleAppNowChatSDKCallbacks

private fun launchChat() {
  binding.progressBar.visibility = View.VISIBLE

  NowChatSDK.makeChatService(
    URL(sdkSettingsProvider.get().instanceBaseURL),
    chatCallbacks
  ) .onSuccess {
    it.start(this, chatCallbacks.nowChatThemeColors) }
  } .onFailure {
     Log.e("NowChat", "Unable to launch chat: $it")
  }
}