{"id":35886876,"url":"https://github.com/fazilus/tdlib-android","last_synced_at":"2026-02-14T21:15:11.619Z","repository":{"id":329908867,"uuid":"1113329099","full_name":"fazilus/tdlib-android","owner":"fazilus","description":"Pre-built TDLib (Telegram Database Library) for Android","archived":false,"fork":false,"pushed_at":"2025-12-22T19:22:03.000Z","size":62273,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-23T19:40:22.653Z","etag":null,"topics":["android","tdlib","telegram"],"latest_commit_sha":null,"homepage":"https://core.telegram.org/tdlib/docs/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fazilus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-09T20:36:58.000Z","updated_at":"2025-12-22T19:22:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fazilus/tdlib-android","commit_stats":null,"previous_names":["fazilus/tdlib-android"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fazilus/tdlib-android","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fazilus%2Ftdlib-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fazilus%2Ftdlib-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fazilus%2Ftdlib-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fazilus%2Ftdlib-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fazilus","download_url":"https://codeload.github.com/fazilus/tdlib-android/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fazilus%2Ftdlib-android/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","tdlib","telegram"],"created_at":"2026-01-08T21:04:40.635Z","updated_at":"2026-02-14T21:15:11.612Z","avatar_url":"https://github.com/fazilus.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TDLib for Android\n\n[![](https://jitpack.io/v/fazilus/tdlib-android.svg)](https://jitpack.io/#fazilus/tdlib-android)\n[![TDLib](https://img.shields.io/badge/TDLib-1.8.61-orange.svg)](https://github.com/tdlib/td)\n[![License](https://img.shields.io/badge/License-BSL--1.0-blue.svg)](LICENSE)\n[![Platform](https://img.shields.io/badge/Platform-Android-green.svg)](https://developer.android.com)\n[![Language](https://img.shields.io/badge/Language-Java%20%7C%20Kotlin-purple.svg)](https://kotlinlang.org)\n\n[TDLib](https://github.com/tdlib/td) is a cross-platform library for building Telegram clients. This library contains pre-compiled native libraries (.so files) and Java wrappers for use in Android projects. Both Java and Kotlin projects are supported.\n\n## What is it for?\n\nWhy do you need this library if you can build TDLib yourself? The answer is quite simple:\n- **Ready to use** — no need to spend time building from source;\n- **Identical functionality** — fully compliant with official TDLib;\n- **Easy updates** — this library will be updated with important TDLib updates, you just need to update the library instead of building it yourself every time\n- **Perfect for Android Studio** — IDE will no longer mark all accesses to TDLib as \"errors\", because now it sees its code.\n\nIf you are still interested in building the library from scratch, refer to these guides:\\\n[Official build instructions](https://github.com/tdlib/td/tree/master/example/android) or [My more detailed build instructions](https://github.com/fazilus/tdlib-android/blob/main/BUILD.MD) \n\n## Installation\n\n### For Kotlin DSL (`settings.gradle.kts` + `build.gradle.kts`)\n\n#### Step 1: Add JitPack repository\n\nIn your `settings.gradle.kts` (project root):\n\n```kotlin\ndependencyResolutionManagement {\n    repositories {\n        google()\n        mavenCentral()\n        maven { url = uri(\"https://jitpack.io\") }\n    }\n}\n```\n\n#### Step 2: Add dependency\n\nIn your `build.gradle.kts` (:app):\n\n```kotlin\ndependencies {\n    implementation(\"com.github.fazilus:tdlib-android:1.8.61\")\n}\n```\n\n**OR** if you use Version Catalog:\n```kotlin\ndependencies {\n    implementation(libs.tdlib.android)\n}\n```\n\nand in `libs.version.toml`:\n\n```kotlin\n[versions]\ntdlib = \"1.8.61\"\n\n[libraries]\n# Core\ntdlib-android = { module = \"com.github.fazilus:tdlib-android\", version.ref = \"tdlib\" }\n```\n\n#### Step 3: Sync project\n\nClick **File → Sync Project with Gradle Files** in Android Studio.\n\n---\n\n### For Groovy (`settings.gradle` + `build.gradle`)\n\n#### Step 1: Add JitPack repository\n\nIn your `settings.gradle` (project root):\n\n```groovy\ndependencyResolutionManagement {\n    repositories {\n        google()\n        mavenCentral()\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\n**OR** if you use legacy format, in your `build.gradle` (project root):\n\n```groovy\nallprojects {\n    repositories {\n        google()\n        mavenCentral()\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\n#### Step 2: Add dependency\n\nIn your `app/build.gradle`:\n\n```groovy\ndependencies {\n    implementation 'com.github.fazilus:tdlib-android:1.8.61'\n}\n```\n\n#### Step 3: Sync project\n\nClick **File → Sync Project with Gradle Files** in Android Studio.\n\n---\n\n## Usage\n\n### Java Example\n\n```java\nimport org.drinkless.tdlib.Client;\nimport org.drinkless.tdlib.TdApi;\n\npublic class TelegramClient {\n    private Client client;\n\n    public void initialize() {\n        // Create client with result handler\n        client = Client.create(object -\u003e {\n            // Handle updates\n            if (object instanceof TdApi.UpdateAuthorizationState) {\n                onAuthorizationStateUpdated(((TdApi.UpdateAuthorizationState) object).authorizationState);\n            }\n        }, null, null);\n    }\n\n    private void onAuthorizationStateUpdated(TdApi.AuthorizationState authorizationState) {\n        if (authorizationState instanceof TdApi.AuthorizationStateWaitTdlibParameters) {\n            // Set TDLib parameters\n            TdApi.SetTdlibParameters parameters = new TdApi.SetTdlibParameters();\n            parameters.apiId = YOUR_API_ID;\n            parameters.apiHash = \"YOUR_API_HASH\";\n            parameters.databaseDirectory = getFilesDir().getAbsolutePath() + \"/tdlib\";\n            parameters.useMessageDatabase = true;\n            parameters.useSecretChats = false;\n\n            client.send(parameters, object -\u003e {});\n        } else if (authorizationState instanceof TdApi.AuthorizationStateWaitPhoneNumber) {\n            // Enter phone number\n            TdApi.SetAuthenticationPhoneNumber phoneNumber = new TdApi.SetAuthenticationPhoneNumber();\n            phoneNumber.phoneNumber = \"+1234567890\";\n            client.send(phoneNumber, object -\u003e {});\n        } else if (authorizationState instanceof TdApi.AuthorizationStateWaitCode) {\n            // Enter verification code\n            TdApi.CheckAuthenticationCode code = new TdApi.CheckAuthenticationCode();\n            code.code = \"12345\";\n            client.send(code, object -\u003e {});\n        } else if (authorizationState instanceof TdApi.AuthorizationStateReady) {\n            // Authorized successfully!\n        }\n    }\n}\n```\n\n### Kotlin Example\n\n```kotlin\nimport org.drinkless.tdlib.Client\nimport org.drinkless.tdlib.TdApi\n\nclass TelegramClient {\n    private lateinit var client: Client\n\n    fun initialize() {\n        // Create client with result handler\n        client = Client.create({ obj -\u003e\n            // Handle updates\n            if (obj is TdApi.UpdateAuthorizationState) {\n                onAuthorizationStateUpdated(obj.authorizationState)\n            }\n        }, null, null)\n    }\n\n    private fun onAuthorizationStateUpdated(authorizationState: TdApi.AuthorizationState) {\n        when (authorizationState) {\n            is TdApi.AuthorizationStateWaitTdlibParameters -\u003e {\n                // Set TDLib parameters\n                val parameters = TdApi.SetTdlibParameters().apply {\n                    apiId = YOUR_API_ID\n                    apiHash = \"YOUR_API_HASH\"\n                    databaseDirectory = filesDir.absolutePath + \"/tdlib\"\n                    useMessageDatabase = true\n                    useSecretChats = false\n                }\n                client.send(parameters) {}\n            }\n            is TdApi.AuthorizationStateWaitPhoneNumber -\u003e {\n                // Enter phone number\n                val phoneNumber = TdApi.SetAuthenticationPhoneNumber().apply {\n                    this.phoneNumber = \"+1234567890\"\n                }\n                client.send(phoneNumber) {}\n            }\n            is TdApi.AuthorizationStateWaitCode -\u003e {\n                // Enter verification code\n                val code = TdApi.CheckAuthenticationCode().apply {\n                    this.code = \"12345\"\n                }\n                client.send(code) {}\n            }\n            is TdApi.AuthorizationStateReady -\u003e {\n                // Authorized successfully!\n            }\n        }\n    }\n}\n```\n\nFor detailed API documentation, see the [official TDLib documentation](https://core.telegram.org/tdlib/docs/).\n\n---\n\n## Supported Architectures\n\nThe library includes native libraries for the following architectures:\n\n- **arm64-v8a** (64-bit ARM)\n- **armeabi-v7a** (32-bit ARM)\n- **x86** (32-bit Intel/AMD)\n- **x86_64** (64-bit Intel/AMD)\n\n## Requirements\n\n- **Minimum SDK**: Android 4.1 (API 16)\n- **Target SDK**: Android 14 (API 34)\n- **Java**: 17+\n\n## License\n\nThis library is distributed under the same license as the original TDLib — **Boost Software License 1.0**.\n\n```\nBoost Software License - Version 1.0 - August 17th, 2003\n\nPermission is hereby granted, free of charge, to any person or organization\nobtaining a copy of the software and accompanying documentation covered by\nthis license (the \"Software\") to use, reproduce, display, distribute,\nexecute, and transmit the Software, and to prepare derivative works of the\nSoftware, and to permit third-parties to whom the Software is furnished to\ndo so, all subject to the following:\n\nThe copyright notices in the Software and this entire statement, including\nthe above license grant, this restriction and the following disclaimer,\nmust be included in all copies of the Software, in whole or in part, and\nall derivative works of the Software, unless such copies or derivative\nworks are solely in the form of machine-executable object code generated by\na source language processor.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT\nSHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\nFOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n```\n\n## Acknowledgments\n\n- [TDLib](https://github.com/tdlib/td)  — original library by Telegram team\n- [JitPack](https://jitpack.io) — for convenient Android library publishing\n\n## Feedback\n\nIf you encounter any issues with a library, please create an [Issue](https://github.com/fazilus/tdlib-android/issues) in this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffazilus%2Ftdlib-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffazilus%2Ftdlib-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffazilus%2Ftdlib-android/lists"}