I'm Theerasan Tonthongkam, but you can call me Ta. I'm an Android engineer with over 10 years of experience, based in Bangkok, Thailand. I joined this contest driven by passion and enthusiasm.
I combined my name, Ta, with Telegram to create the name of my app: Ta-legram. In Thai, Ta-le means "ocean," which is why I chose a wave as the app icon.
- I extracted all the magic numbers I used into variables. (I didn’t extract all of them to avoid excessive changes.)
- I reordered the views and view inflation to properly layer the avatar, gift background, drop effects, and blur image.
- I recalculated the X and Y positions of each component to ensure smooth transitions.
- I created the buttons under the avatar based on priority. As a result, they may not exactly align with the design, which also doesn’t showcase other profile types such as groups, channels, etc.
- Floating buttons
- Displayed menu items (Edit, Call, Video Call)
- Additional menu
- The button section only contains up to 4 items
- When all 4 buttons are shown, the menu items and floating button will be hidden to avoid duplicated actions
- I added auto-expand and auto-collapse behavior for the top bar:
- If the avatar is scrolled more than 20% out of view and the user releases the scroll, the top bar will collapse.
- On the other hand, if the avatar is visible at 80% or more of its height when the scroll is released, the top bar will expand.
- I created a new method specifically for this case, so it won’t affect other screens.
- I also added a tolerance value for each emoji — the one with the least tolerance will move to the avatar first.
- I reworked this to avoid using hardcoded indices. Instead, I applied the same concept used in the Profile Pattern, with predefined points and tolerance values.
- I draw the canvas drop effect by calculating each path based on the user's movement.
- With this approach, there's no need to introduce new assets or libraries.
- I hid the profile icon so that during the transition from the chat activity to the profile activity, the avatar moves down from the top. This creates a smoother transition between screens.
- I updated the default icon to a wave icon.
- I named the app "Ta-legram", and "B - Ta-legram" for the beta version.
- The app still supports switching to the existing predefined icons.
after.mp4
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.
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.
- Obtain your own api_id for your application.
- Please do not use the name Telegram for your app — or make sure your users understand that it is unofficial.
- Kindly do not use our standard logo (white paper plane in a blue circle) as your app's logo.
- Please study our security guidelines and take good care of your users' data and privacy.
- Please remember to publish your code too in order to comply with the licences.
Telegram API manuals: https://core.telegram.org/api
MTproto protocol manuals: https://core.telegram.org/mtproto
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
- Download the Telegram source code from https://github.com/DrKLO/Telegram ( git clone https://github.com/DrKLO/Telegram.git )
- Copy your release.keystore into TMessagesProj/config
- Fill out RELEASE_KEY_PASSWORD, RELEASE_KEY_ALIAS, RELEASE_STORE_PASSWORD in gradle.properties to access your release.keystore
- 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.
- Open the project in the Studio (note that it should be opened, NOT imported).
- 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.
- You are ready to compile Telegram.
We moved all translations to https://translations.telegram.org/en/android/. Please use it.