val connectionType = ConnectionType.AUTOMATIC or ConnectionType.MANUALval projectId = "" // Get Project ID at https://dashboard.reown.com/val appMetaData = Core.Model.AppMetaData( name = "Kotlin.AppKit", description = "Kotlin AppKit Implementation", url = "kotlin.reown.com", icons = listOf("https://gblobscdn.gitbook.com/spaces%2F-LJJeCjcLrr53DcT1Ml7%2Favatar.png?alt=media"), redirect = "kotlin-modal-wc://request")CoreClient.initialize(projectId = projectId, connectionType = connectionType, application = this, metaData = appMetaData)AppKit.initialize( init = Modal.Params.Init(CoreClient), onSuccess = { // Callback will be called if initialization is successful }, onError = { error -> // Error will be thrown if there's an issue during initialization })
This example of define ethereum chain. You can define the chains you want to use. The chain must be EVM compatible.
Copy
Example of definition chains: https://github.com/reown-com/reown-kotlin/blob/main/product/appkit/src/main/kotlin/com/reown/appkit/presets/AppKitChainsPresets.ktAppKit.setChains(AppKitChainsPresets.ethChains.values.toList())
IMPORTANT: Chains must be set before opening the modal.