Setting up TDLib for Android usually means spending hours configuring CMake, the NDK, and complex JNI bindings.
To solve this, I built EasyTDLib. It is a ready-to-use Android Studio boilerplate that completely bypasses the C++ setup using pre-compiled binaries.
It handles the complex engine configuration so you can start building your app's UI immediately.
What is included:
- Zero C++ Setup: No NDK or CMake required.
- Complete Login Flow: Automatically handles Phone -> OTP Code -> 2FA Password -> Ready states.
- Modern Stack: The UI is built with Jetpack Compose (Material 3).
-
Clean Architecture: Uses Kotlin Coroutines and
StateFlowto manage the TDLib engine. - Chat List: Includes a basic chat list with avatar image downloading (via Coil).
How to use it in 3 steps:
1. Clone the repository:
git clone [https://github.com/kcvabeysinghe/EasyTDLib.git](https://github.com/kcvabeysinghe/EasyTDLib.git)
2. Add your API Keys: Get your api_id and api_hash from my.telegram.org and replace the placeholders in TelegramManager.kt.
3. Run the app: Sync Gradle and press Run in Android Studio. That's it.
Get the code
You can view the full source code and documentation here:
👉 EasyTDLib on GitHub
If this template saves you a few hours of setup time, please consider leaving a ⭐ on the repository! Let me know in the comments if you have any questions.
Top comments (0)