Created
February 4, 2021 08:44
-
-
Save wajahatkarim3/ed4d2d1988e8d40d0f6db4987796d659 to your computer and use it in GitHub Desktop.
Customizing Color of CometChat UI Kit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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