Telegram for Android source
Find a file
Lokesh Meena 218c59ecae
Enhanced README with Detailed Build Instructions and Developer Guidelines
This PR significantly enhances the README.md file by improving its clarity, structure, and overall usefulness for developers looking to contribute to or create their own Telegram-based applications. The changes ensure the instructions are comprehensive, easy to follow, and aligned with Telegram's standards.

Key Changes:
Improved Step-by-Step Instructions: Expanded the build and compilation guide with clearer explanations, ensuring new developers can easily follow along.

Emphasized Important Guidelines: Highlighted critical requirements, such as obtaining an API ID, using a unique app name and logo, and following Telegram's security guidelines.
Enhanced Formatting: Used better sectioning and formatting to make the document easier to navigate and more visually appealing.

Added Links to Key Resources: Direct links to documentation for Telegram API, MTProto Protocol, and reproducible builds, helping developers quickly access essential resources.
Revised Localization Section: Simplified instructions for contributing to language translations via Telegram's translation platform.

These changes aim to improve developer onboarding and ensure adherence to Telegram’s guidelines for building and distributing applications based on its platform.
2024-10-13 07:39:07 +05:30
gradle/wrapper Update to 8.0.0 (2406) 2021-08-31 22:06:39 +03:00
TMessagesProj update to 11.1.3 (5244) 2024-09-11 02:48:10 +04:00
TMessagesProj_App update to 11.1.1 (5235) 2024-09-11 01:07:16 +04:00
TMessagesProj_AppHockeyApp update to 11.1.1 (5235) 2024-09-11 01:07:16 +04:00
TMessagesProj_AppHuawei update to 11.1.1 (5235) 2024-09-11 01:07:16 +04:00
TMessagesProj_AppStandalone update to 11.1.3 (5243) 2024-09-11 01:59:53 +04:00
Tools update to 10.10.0 (4571) 2024-03-31 23:10:51 +04:00
.gitignore update to 10.10.0 (4571) 2024-03-31 23:10:51 +04:00
apkdiff.py update apkdiff.py apkfrombundle.py 2023-01-26 17:06:12 +04:00
apkfrombundle.py update apkdiff.py apkfrombundle.py 2023-01-26 17:06:12 +04:00
build.gradle update to 11.1.1 (5235) 2024-09-11 01:07:16 +04:00
Dockerfile update to 10.1.1 (3926) 2023-09-23 22:46:49 +04:00
gradle.properties update to 11.1.3 (5244) 2024-09-11 02:48:10 +04:00
gradlew first commit 2013-10-25 19:19:00 +04:00
LICENSE first commit 2013-10-25 19:19:00 +04:00
README.md Enhanced README with Detailed Build Instructions and Developer Guidelines 2024-10-13 07:39:07 +05:30
settings.gradle update to 10.1.0 (3919) 2023-09-22 18:40:36 +04:00

Telegram Messenger for Android

Welcome to the official source code repository of Telegram for Android. Telegram is a cloud-based messaging app with a focus on speed and security. Its free, simple, and superfast, offering a wide range of features to its users.

This repository allows developers to build and contribute to Telegram for Android by leveraging our source code.


Getting Started with Your Own Telegram Application

We encourage developers to use our API and source code to build apps on the Telegram platform. However, there are several important guidelines that all developers need to follow when creating their Telegram-based applications:

Essential Requirements for Developers:

  1. Obtain Your Own API ID
    Each app interacting with Telegrams platform must have a unique API ID. Obtain yours by following the instructions here.

  2. Avoid Using the Name "Telegram"
    Please choose a unique name for your application. Using "Telegram" is prohibited, as it may confuse users. Be sure your users understand that your app is unofficial.

  3. Create a Unique Logo
    Do not use Telegram's official logo (white paper plane in a blue circle). Design your own logo to differentiate your app.

  4. Follow Security Guidelines
    Protect your users' privacy and data. Make sure to read and implement the security guidelines for handling user information securely.

  5. Publish Your Code
    In compliance with open-source licensing, if you modify the Telegram source code, you must publish your changes. This helps foster transparency and collaboration within the community.


Documentation for API and Protocol

These resources provide in-depth information about working with Telegrams backend and communication protocols.


Build and Compilation Guide

If you're planning to compile and build your own version of Telegram for Android, please follow the steps below. It's important to ensure that all required dependencies and configurations are set up correctly.

Prerequisites

Before you begin, ensure that the following tools and dependencies are installed:

  • Android Studio (version 3.4 or higher)
  • Android NDK (revision 20 or later)
  • Android SDK (version 8.1, API level 27 or later)

Step-by-Step Compilation Instructions

  1. Clone the Repository
    First, download the Telegram source code to your local machine using Git:

    git clone https://github.com/DrKLO/Telegram.git
    
  2. Set Up Your Keystore
    Place your release.keystore file in the following directory:

    TMessagesProj/config
    
  3. Configure Gradle Properties
    Open the gradle.properties file and input your keystore credentials:

    • RELEASE_KEY_PASSWORD
    • RELEASE_KEY_ALIAS
    • RELEASE_STORE_PASSWORD
  4. Configure Firebase
    To enable Firebase services, follow these steps:

    • Go to the Firebase Console.
    • Create two Android apps with the following IDs:
      • org.telegram.messenger
      • org.telegram.messenger.beta
    • Enable Firebase Cloud Messaging.
    • Download the google-services.json file and place it in the TMessagesProj directory.
  5. Open the Project in Android Studio
    Launch Android Studio and select Open (not Import) to open the project.

  6. Configure Build Variables
    In TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java, fill in the necessary values. Each variable has a corresponding link that explains how to obtain the required data.

  7. Compile Your APK
    Once all configurations are complete, you can compile and build the APK by clicking the Run button in Android Studio.


Supporting Reproducible Builds

Telegram supports Reproducible Builds to ensure the integrity of the source code. This repository includes dummy files such as release.keystore and google-services.json. Before distributing your version of Telegram, ensure that these files are replaced with your own.


Localization

Weve centralized all language translations for Telegram for Android on our Translation Platform. If you want to contribute by translating Telegram into your language, please use this platform to get started.


By following these instructions and adhering to the guidelines, you will be able to build, customize, and publish your own version of Telegram for Android. We are excited to see how you contribute to the Telegram ecosystem!