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.
This commit is contained in:
Lokesh Meena 2024-10-13 07:39:07 +05:30 committed by GitHub
parent 1e89182699
commit 218c59ecae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

118
README.md
View file

@ -1,39 +1,105 @@
## Telegram messenger for Android # Telegram Messenger for Android
[Telegram](https://telegram.org) is a messaging app with a focus on speed and security. Its superfast, simple and free. Welcome to the official source code repository of [Telegram for Android](https://play.google.com/store/apps/details?id=org.telegram.messenger). 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 repo contains the official source code for [Telegram App for Android](https://play.google.com/store/apps/details?id=org.telegram.messenger).
## Creating your Telegram Application This repository allows developers to build and contribute to Telegram for Android by leveraging our source code.
We welcome all developers to use our API and source code to create applications on our platform. ---
There are several things we require from **all developers** for the moment.
1. [**Obtain your own api_id**](https://core.telegram.org/api/obtaining_api_id) for your application. ## Getting Started with Your Own Telegram Application
2. Please **do not** use the name Telegram for your app — or make sure your users understand that it is unofficial.
3. Kindly **do not** use our standard logo (white paper plane in a blue circle) as your app's logo.
3. Please study our [**security guidelines**](https://core.telegram.org/mtproto/security_guidelines) and take good care of your users' data and privacy.
4. Please remember to publish **your** code too in order to comply with the licences.
### API, Protocol documentation 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:
Telegram API manuals: https://core.telegram.org/api ### Essential Requirements for Developers:
MTproto protocol manuals: https://core.telegram.org/mtproto 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](https://core.telegram.org/api/obtaining_api_id).
### Compilation Guide 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.
**Note**: In order to support [reproducible builds](https://core.telegram.org/reproducible-builds), this repo contains dummy release.keystore, google-services.json and filled variables inside BuildVars.java. Before publishing your own APKs please make sure to replace all these files with your own. 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.
You will require Android Studio 3.4, Android NDK rev. 20 and Android SDK 8.1 4. **Follow Security Guidelines**
Protect your users' privacy and data. Make sure to read and implement the [**security guidelines**](https://core.telegram.org/mtproto/security_guidelines) for handling user information securely.
1. Download the Telegram source code from https://github.com/DrKLO/Telegram ( git clone https://github.com/DrKLO/Telegram.git ) 5. **Publish Your Code**
2. Copy your release.keystore into TMessagesProj/config 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.
3. Fill out RELEASE_KEY_PASSWORD, RELEASE_KEY_ALIAS, RELEASE_STORE_PASSWORD in gradle.properties to access your release.keystore
4. Go to https://console.firebase.google.com/, create two android apps with application IDs org.telegram.messenger and org.telegram.messenger.beta, turn on firebase messaging and download google-services.json, which should be copied to the same folder as TMessagesProj.
5. Open the project in the Studio (note that it should be opened, NOT imported).
6. Fill out values in TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java theres a link for each of the variables showing where and which data to obtain.
7. You are ready to compile Telegram.
### Localization ---
We moved all translations to https://translations.telegram.org/en/android/. Please use it. ## Documentation for API and Protocol
- Access the **Telegram API** documentation: [Telegram API Documentation](https://core.telegram.org/api)
- Learn more about the **MTProto Protocol**: [MTProto Protocol Documentation](https://core.telegram.org/mtproto)
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:
```bash
git clone https://github.com/DrKLO/Telegram.git
```
2. **Set Up Your Keystore**
Place your `release.keystore` file in the following directory:
```bash
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](https://console.firebase.google.com/).
- 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](https://core.telegram.org/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](https://translations.telegram.org/en/android/). 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!