Telegram for Android source

Overview

Telegram messenger for Android

Telegram is a messaging app with a focus on speed and security. It’s superfast, simple and free. This repo contains the official source code for Telegram App for Android.

Creating your Telegram Application

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 for your 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.
  4. Please study our security guidelines and take good care of your users' data and privacy.
  5. Please remember to publish your code too in order to comply with the licences.

API, Protocol documentation

Telegram API manuals: https://core.telegram.org/api

MTproto protocol manuals: https://core.telegram.org/mtproto

Compilation Guide

Note: In order to support 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.

You will require Android Studio 3.4, Android NDK rev. 20 and Android SDK 8.1

  1. Download the Telegram source code from https://github.com/DrKLO/Telegram ( git clone https://github.com/DrKLO/Telegram.git )
  2. Copy your release.keystore into TMessagesProj/config
  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 – there’s 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.

Comments
  • Fixed infinite connection loop when device has no network.

    Fixed infinite connection loop when device has no network.

    When the device has no network or is in offline mode the code enters in a loop, attempting (and obviously failing) to ping the servers. This brings to 100% CPU usage and battery drain. This patch simply avoids to reschedule a connection attempt when there is no network.

    A typo in a log message has been also fixed.

    opened by mscg82 33
  • Settings toggle to invert notification messages

    Settings toggle to invert notification messages

    Telegram is the only chat application that inverts the order of messages in the notifications. I added an option in the notification settings to allow the user to select which order they want their messages to appear.

    opened by jcarter3 17
  • Dutch translation for Telegram

    Dutch translation for Telegram

    I (@geertw and @NielsdeBlaauw) have made a professional Dutch translation for Telegram, courtesy by @interexperts. We have thorougly reviewed our translation and we are sure that it is correct, consistent and has the right attitude towards Dutch natives. Thank you for considering our merge!

    opened by geertw 14
  • New features, some of them solving open issues

    New features, some of them solving open issues

    I have implemented some features that people usually request to Support Force Team:

    1. Confirmation when creating a new secret chat: according to issue #241
    2. Confirmation when sharing contact info: As it is an option that appears on top of chat when contact don't know your number, I think (and so do some other member of Spanish Support Force) that it is a good idea to ask for confirmation, to avoid unintentionally clicks.
    3. Only wifi Automatic Download: As an option in settings for Audio and photos, according to issue #146. It can also be helpful to save data, when then people, like me, have a limit of 1GB or even less.
    4. Add Version Info in Settings: A new section have been added in settings (at the bottom) that shows currently version name, according to issue #391.
    5. Show/Hide Last Connection: This is the hardest one because with current API the only way (the one I used) is to avoid client sending "online" notification to servers, so other users can't know if I am online; they will only know the time when I decided to hide it as my "last connection time". According to this, this feature is client dependent so if using another client without this feature, this client will send "online" info and contact wil know it.
    6. Finally I added some strings needed to strings.xml (in English and Spanish).

    There are some changes in build.gradle that I needed in order to compile my app correctly, but don't think they are needed in official version (except changing version number).

    opened by rubenlagus 13
  • Update strings.xml

    Update strings.xml

    This file is a Catalan Translation ("values-ca") For Catalan people. WhatsApp is not translated to Catalan and this must bé a good feature to Telegram.By the way, What about to change language from Setttings menu?Not all devices have Catalan system option and choosing from menu can solve this issue with Telegram App.Kind Regards Escufi

    opened by escufi 13
  • Catalan translation + fix a hard-coded string ('Send Logs')

    Catalan translation + fix a hard-coded string ('Send Logs')

    I first fixed a hard-coded string in SettingsActivity.java externalizing it to resources XML files (warning, in values-ar I put it in English).

    Then I created the Catalan translation from scratch.

    opened by unknowncatalan 12
  • BUG in notification settings activity

    BUG in notification settings activity

    [BUG] after call this method, when MessagesLed and GroupLed row fit in a same screen both of them display in a same color.

    Because of Issues section is disabled I had to propose that here.

    opened by SHi-ON 9
  • New Features for Blocked Contacts

    New Features for Blocked Contacts

    1. Added a new table in database for blocked contacts
    2. Bocked contacts list in setting now make use of previous database.
    3. When seeing the profile of a blocked contact, now appear the option to "unblock" it instead of "block" one.
    4. Added support for more than 200 blocked contact (not tested as I don't have so many blocked contacts).
    5. When blocking/unblocking a contact, de table in database is updated and a notification posted (also when loading MessagesActivity.java).
    6. In Contact Profile Activity, the menu bar is forced to be created/modified by the UIthread (to avoid problems when need to be modified)
    7. Added comment to the methods I have added.
    opened by rubenlagus 9
  • added notification light settings (global, user, chat)

    added notification light settings (global, user, chat)

    I have added the ability to change the notification light for private chats and group chats. Additionally the color can be changed for each individual user/group.

    It would be nice to see this in the next version :)

    opened by ghost 9
  • improved accessibility of telegram for blind users

    improved accessibility of telegram for blind users

    In oficial telegram for android it exists problem,when it impossible accept or decline calls with talkback,if we have android seven or lower,I.E when blind users do double tap,it nothing happends,because we not get action AccessibilityNodeInfo.ACTION_CLICK in method of custom view performAccessibilityAction and in method onTouchEvent of custom view we should be use super version of this method,I.E super.onTouchEvent and we should set clickable true in constructor of class CallSwipeView. Also in telegram,when someone busy and decline our call,instead of contentDescription with CallAgain string name we have contentDescription with VoipEndCall string name,so blind users consider,that after pressing of this button window of call in telegram probably will be closed,I.E as it works,when user press cancel button,but instead of this call start again,so it should be fixed,because it misleadin of blind users of telegram. Also in this pull request was fixed error 87,which happends,for example,if we compile telegram in android studio in windows.

    opened by AlexandrKozlovskiy 8
  • fixed remote upload of images (eg. the one in your backup Google folder)

    fixed remote upload of images (eg. the one in your backup Google folder)

    if you try to upload an image from your Google backup for example (ie is not in your local storage) i'ts doing nothing. After this fix it works: the changes for uploading image are made only in ChatActivity and Wallpaper one.. Are you using image upload elsewere?

    for more infos: https://developer.android.com/guide/topics/providers/document-provider.html#client at the paragraph Open a document -> Bitmap

    opened by AlexGreg 8
  • Fix ipv6 connection hangs when in v4 environment

    Fix ipv6 connection hangs when in v4 environment

    Since connection will be reset to USE_IPV4_IPV6_RANDOM when connection failed even in pure v4 environment.

    https://github.com/DrKLO/Telegram/blob/0e17caa7a6facd8220077ee708c4acc942a175d1/TMessagesProj/jni/tgnet/Connection.cpp#L699-L702

    However, it does not reset lastProtocolUsefullData correctly if connectionType is not ConnectionTypeGeneric (usually problem occurs when ConnectionTypeGenericMedia) and lastProtocolUsefullData will be set false only here.

    https://github.com/DrKLO/Telegram/blob/0e17caa7a6facd8220077ee708c4acc942a175d1/TMessagesProj/jni/tgnet/Connection.cpp#L299-L311

    So it always connect as ipv6 if lastProtocolUsefullData is true and RAND_bytes got 0, 3, 6 even there is no ipv6 capability.

    I try to fix it using always reset lastProtocolUsefullData to false when USE_IPV4_IPV6_RANDOM is meet.

    opened by ayanamist 0
  • Fix black screen in topics (Forwarding messages)

    Fix black screen in topics (Forwarding messages)

    When you try to forward any message from topic to a topic, the screen becomes black if you use Alternative navigation. We have to use animation start and end to fix this issue

    opened by arsLan4k1390 0
  • Fix keyboard dpad navigation in lists

    Fix keyboard dpad navigation in lists

    This pull request enables selection of list items in RecyclerListView by pressing Enter or Dpad's Center button (or other keys as specified by https://developer.android.com/training/tv/start/controllers) on list items. This works on lists where item's focusable property is set to true, for example, on the applications' main chats list. This replaces my similar pull request https://github.com/DrKLO/Telegram/pull/1594 with updated code.

    opened by mbarashkov 0
Releases(release-9.1.0_2885)
Owner
DrKLO
DrKLO
GWT Open Source Project

GWT GWT is the official open source project for GWT releases 2.5 and onwards. In this document you have some quick instructions to build the SDK from

GWT 1.4k Dec 2, 2022
An evolving set of open source web components for building mobile and desktop web applications in modern browsers.

Vaadin components Vaadin components is an evolving set of high-quality user interface web components commonly needed in modern mobile and desktop busi

Vaadin 514 Nov 30, 2022
Telegram for Android source

Telegram messenger for Android Telegram is a messaging app with a focus on speed and security. It’s superfast, simple and free. This repo contains the

DrKLO 21.1k Dec 2, 2022
A hybrid chat android application based on the features of Instagram and Whatsapp having UI just as Telegram.

GupShup About App It is a free online chat android application, enabling user to create a free user account and then log in using the credentials. Aft

Ratik Tiwari 1 May 22, 2022
Catogram - Experimental telegram client based on official Android sources

Catogram Experimental telegram client based on official Android sources Features: Message translator TGX Style of context menu VKUI Icons and inbuilt

null 186 Dec 2, 2022
Android Auto Apps Downloader (AAAD) is an app for Android Phones that downloads popular Android Auto 3rd party apps and installs them in the correct way to have them in Android Auto.

Android Auto Apps Downloader (AAAD) is an app for Android Phones that downloads popular Android Auto 3rd party apps and installs them in the correct way to have them in Android Auto.

Gabriele Rizzo 822 Nov 28, 2022
This service checks the Co-WIN public API at a specific interval and send update to users specified telegram bot.

COVID VACCINE TELEGRAM BOT USING SPRING BOOT This application is a covid vaccine slot notifier via telegram bot. This application uses public CO-WIN A

Hardeek Sharma 6 Oct 4, 2022
Telegram Bot For U2

Telegram Bot - U2 Tool Box 下载 Release 中的 Jar 文件自行部署,不定时更新 一键部署脚本 在 root 下执行以下命令,仅支持 centos (瞎写的不一定好用 bash <(curl -sSL https://raw.githubusercontent.co

KA 35 Nov 25, 2022
TMU is very simple app for posting your digital manga as article into Telegraph for further reading using any browser or in Telegram with Instant View.

TMU is very simple app for posting your digital manga as article into Telegraph for further reading using any browser or in Telegram with Instant View. App may be very helpful for content translators that searching easy way to share their work.

null 5 Oct 6, 2022
Bot de Telegram que informa del precio del combustible en las gasolineras más próximas a tu ubicación

Telegram BOT Bot de Telegram en JAVA y SQLite. Sirve para consultar los precios de las gasolineras más cercanas a tu ubicación. Los datos son proceden

null 6 Jan 12, 2022
Nagram is a third-party Telegram client based on Nekogram with not many but useful modifications

?? Nagram is a third-party Telegram client based on Nekogram with not many but useful modifications. Official site: https://nextalone.xyz Teleg

NextAlone 164 Dec 7, 2022
Killergram - Remove sponsored messages of Telegram

Killergram An Android Xposed module to remove sponsored messages of Telegram Support clients Official org.telegram.messenger Official org.telegram.mes

Shatyuka 500 Nov 25, 2022
[WIP] Springram is uber library for working with Telegram using Spring Framework and Spring Boot.

Springram Springram is a library for working with telegram using the spring framework and spring boot. This library gives you the ability to use contr

Max 6 Nov 1, 2022
TrashEmail is hosted Telegram bot that can save your private email address by offering disposable email address

TrashEmail is hosted Telegram bot that can save your private email address by offering disposable email address. It can create, manage, disposable email address and link them with your telegram bot chat.

Rohit Sehgal 490 Nov 14, 2022
An Xposed module for Telegram clients

TMoe TMoe 是一个兼容若干第三方开源 Telegram 客户端的开源 Xposed 模块 使用方法 激活本模块后,在 Telegram 客户端的设置中点击 "TMoe 设置" 即可开关对应功能。 一切开发旨在学习,请勿用于非法用途 本项目保证永久开源,欢迎提交 Issue 或者 Pull R

Acetylcholine 316 Nov 29, 2022
Nekogram is a third-party Telegram client with not many but useful modifications

Nekogram is a third-party Telegram client with not many but useful modifications

Ketal 8 Nov 13, 2022
A simple proxy software made for Telegram. Works well for areas that have MTProxy or Socks5 blocked.

A simple proxy software made for Telegram. Works well for areas that have MTProxy or Socks5 blocked.

null 40 Dec 2, 2022
A Java Telegram bot that provides thirukkural in tamil, english translations with all information!

A Java Telegram bot that provides thirukkural in tamil, english translations with all information!

VINU 5 Oct 19, 2022
OwlGram is an unofficial messaging app that uses Telegram's API.

?? OwlGram OwlGram is an unofficial messaging app that uses Telegram's API. ?? About Reproducible Builds To reproduce the build of OwlGram is only nee

OwlGram Dev 184 Dec 7, 2022
This is an open source android based Music Player application developed in Android Studio

Pulse Music An offline music player android app, with modern UI and powerful features If you liked this repo, fork it and leave a STAR. Your support m

Sharath 7 Apr 11, 2022