Skip to content

Instantly share code, notes, and snippets.

@wajahatkarim3
Created February 4, 2021 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wajahatkarim3/ed4d2d1988e8d40d0f6db4987796d659 to your computer and use it in GitHub Desktop.
Save wajahatkarim3/ed4d2d1988e8d40d0f6db4987796d659 to your computer and use it in GitHub Desktop.
Customizing Color of CometChat UI Kit
fun initCometChat() {
val appID = getString(R.string.app_id) // Replace with your App ID
val region = getString(R.string.region) // Replace with your App Region ("eu" or "us")
val appSettings: AppSettings = AppSettings.AppSettingsBuilder().subscribePresenceForAllUsers().setRegion(
region
).build()
CometChat.init(this, appID, appSettings, object : CometChat.CallbackListener<String?>() {
override fun onSuccess(successMessage: String?) {
Log.d("ZocdocApp", "Initialization completed successfully")
}
override fun onError(e: CometChatException) {
Log.d("ZocdocApp", "Initialization failed with exception: " + e.localizedMessage)
}
})
// Setting Colors
UIKitSettings.setColor(resources.getString(R.color.colorPrimaryVariant))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment