> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ton.org/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.ton.org/feedback

```json
{
  "path": "/ecosystem/walletkit/android/init",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# How to initialize the TON Connect's WalletKit on the Android platform

## Creating configuration

The basic kit initialization consists of creating a corresponding object by passing it a minimal set of necessary arguments. Pick a TON network to operate on, a wallet manifest, and feature configurations.

Here is an example of a minimal configuration:

```kotlin theme={"theme":{"light":"github-light-default","dark":"dark-plus"},"languages":{"custom":["/resources/grammars/tolk.tmLanguage.json","/resources/grammars/tlb.tmLanguage.json","/resources/grammars/fift.tmLanguage.json","/resources/grammars/tasm.tmLanguage.json","/resources/grammars/func.tmLanguage.json"]}}
import io.ton.walletkit.ITONWalletKit
import io.ton.walletkit.config.TONWalletKitConfiguration
import io.ton.walletkit.config.SignDataType
import io.ton.walletkit.model.TONNetwork

// URL of the wallet's implementation of the HTTP bridge:
// https://github.com/ton-connect/docs/blob/main/bridge.md#http-bridge
//
// Can be different, e.g., https://bridge.tonapi.io/bridge
val bridgeURL = "https://connect.ton.org/bridge"

val features = listOf(
    // Wallet can send transactions.
    TONWalletKitConfiguration.SendTransactionFeature(
        // Max number of messages that can be sent in a single transaction.
        // Depends on the TON wallet used, because different kinds can handle
        // different number of messages.
        maxMessages = 1,

        // Are messages sending extra-currencies supported?
        extraCurrencySupported = false
    ),
    TONWalletKitConfiguration.SignDataFeature(
        types = listOf(
            // Types of data to sign.
            SignDataType.TEXT, SignDataType.BINARY, SignDataType.CELL
        )
    )
)

val configuration = TONWalletKitConfiguration(
    network = TONNetwork.MAINNET, /* or TONNetwork.TESTNET */
    walletManifest = TONWalletKitConfiguration.Manifest(
        name = "Name of your wallet service",
        appName = "your_wallet_service_id", /* e.g. best_ton_wallet_service */
        imageUrl = "https://<YOUR_WALLET_SERVICE_URL>/image.png",
        aboutUrl = "https://<YOUR_WALLET_SERVICE_URL>/about",
        universalLink = "https://<YOUR_WALLET_SERVICE_URL>/universal-link",
        bridgeUrl = bridgeURL
    ),
    bridge = TONWalletKitConfiguration.Bridge(
        bridgeUrl = bridgeURL
    ),
    features = features
)
```

### Storage configuration

By default, WalletKit uses persistent storage. To set a different behavior, use the `storage` parameter when [creating a new configuration](#creating-configuration):

```kotlin theme={"theme":{"light":"github-light-default","dark":"dark-plus"},"languages":{"custom":["/resources/grammars/tolk.tmLanguage.json","/resources/grammars/tlb.tmLanguage.json","/resources/grammars/fift.tmLanguage.json","/resources/grammars/tasm.tmLanguage.json","/resources/grammars/func.tmLanguage.json"]}}
val configuration = TONWalletKitConfiguration(
    // ...other fields...
    storage = TONWalletKitConfiguration.Storage(
        persistent = true // or false for memory-only storage
    )
)
```

## Creating WalletKit instance

Once you have a configuration, create an instance of the kit:

```kotlin theme={"theme":{"light":"github-light-default","dark":"dark-plus"},"languages":{"custom":["/resources/grammars/tolk.tmLanguage.json","/resources/grammars/tlb.tmLanguage.json","/resources/grammars/fift.tmLanguage.json","/resources/grammars/tasm.tmLanguage.json","/resources/grammars/func.tmLanguage.json"]}}
import io.ton.walletkit.ITONWalletKit

// Instance
val walletKit = ITONWalletKit.initialize(
    context = context,
    config = configuration
)
```
