End Session

End the currently active Versus session.

Android

// @return VsLiveData<SessionEndStatus> object.
fun end(): VsLiveData<SessionEndStatus>
SDK.Session.end().observe(object : VsObserver<Boolean>() {
  override fun onError(error: Throwable) {}

  override fun onChanged(t: Boolean) {}
})

iOS

/// - Parameters:
///     - completionHandler: This closure will be called when the session is ended.
endSession(completionHandler: @escaping VersusApiResponse<VersusSession>)
VersusSDK?.endSession(completionHandler: { (session, error) in
    if error != nil {
        // error occurred
    } else {
        // Successfully ended the returned `session`
    }
})