BaseModuleFragment

Fragments provided to use UIKit's modules. Each Fragment has a single module structured by UI components and ViewModel. And below Callback functions are called on the onCreate method.

The functions below are called in order.

  1. onCreateModule
  2. onConfigureParams
  3. onCreateModule
  4. onCreateViewModel
After above methods are all called, the created view model tries to authenticate. User authentication completed means the fragment is ready to use. When authentication is complete, the onBeforeReady and onReady methods are called. The ReadyState let you know to determine the result of the authentication. If the ReadyStatus is READY, the current user instance and the channel instance ars available.

See also

since 3.0.0

Parameters

<MT>

The specific module type that the fragment that inherits this class wants to use

<VM>

The specific view model type that the fragment that inherits this class wants to use

Functions

Link copied to clipboard
protected abstract fun onBeforeReady(@NonNull status: ReadyStatus, @NonNull module: MT, @NonNull viewModel: VM)
After authenticate ()} is finished, onReady will be called with the result of authentication and all preparations will be ready to use.
Link copied to clipboard
protected abstract fun onConfigureParams(@NonNull module: MT, @NonNull args: Bundle)
Called to initialize the module's params or components' params.
Link copied to clipboard
open fun onCreate(@Nullable savedInstanceState: Bundle)
Create a module and a view model, and proceed with the authentication process in the view model.
Link copied to clipboard
protected abstract fun onCreateModule(@NonNull args: Bundle): MT
Called to do initial creation of a module.
Link copied to clipboard
open fun onCreateView(@NonNull inflater: LayoutInflater, @Nullable container: ViewGroup, @Nullable savedInstanceState: Bundle): View
Link copied to clipboard
protected abstract fun onCreateViewModel(): VM
Called to do initial creation of a view model.
Link copied to clipboard
protected abstract fun onReady(@NonNull status: ReadyStatus, @NonNull module: MT, @NonNull viewModel: VM)
Called to start the operation of the fragment after authentication and module setup.
Link copied to clipboard
protected open fun shouldAuthenticate()
Requests authentication with Sendbird Chat SDK.

Properties

Link copied to clipboard
@get:NonNull
protected open val module: MT
Link copied to clipboard
@get:NonNull
protected open val viewModel: VM

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard