I would like to program a mobile DApp which connects to a wallet, like a webapp. I thought it may be possible with WalletConnect. Has anyone ever done this?
This is indeed possible with WalletConnect.
There is a Kotlin library available (both for v1 and v2 of WalletConnect).
For v1 you can use: https://github.com/WalletConnect/kotlin-walletconnect-lib
You need to generate a WallectConnect session with a valid bridge server (e.g. for testing
Then you use this to create an intent and open any installed wallet that can handle the
wc protocol: https://github.com/WalletConnect/kotlin-walletconnect-lib/blob/1486aa2d374d2e64614bf6d467a4076f1215d1a0/sample/app/src/main/java/io/walletconnect/example/MainActivity.kt#L65
For the new v2 version for Kotlin you can find the documentation here: https://docs.walletconnect.com/2.0/quick-start/wallets/kotlin
Here is the source: https://github.com/WalletConnect/WalletConnectKotlinV2