├── .gitignore
├── .idea
├── .name
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── scopes
│ └── scope_settings.xml
└── vcs.xml
├── README.md
├── app
├── .gitignore
├── app.iml
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ ├── com
│ │ └── katy
│ │ │ └── telegram
│ │ │ ├── Activities
│ │ │ ├── ActivationActivity.java
│ │ │ ├── BaseActivity.java
│ │ │ ├── ChatActivity.java
│ │ │ ├── ConversationsActivity.java
│ │ │ ├── CountriesListActivity.java
│ │ │ ├── ImageViewActivity.java
│ │ │ ├── RegistrationActivity.java
│ │ │ └── SplashScreenActivity.java
│ │ │ ├── Adapters
│ │ │ ├── ChatAdapter.java
│ │ │ ├── ChoosePhotoAdapter.java
│ │ │ ├── ConversationsAdapter.java
│ │ │ └── CountryAdapter.java
│ │ │ ├── Fragments
│ │ │ ├── AttachPhotoFragment.java
│ │ │ └── NavigationDrawerFragment.java
│ │ │ ├── Managers
│ │ │ ├── AccountManager.java
│ │ │ ├── ChatsManager.java
│ │ │ ├── CountriesManager.java
│ │ │ ├── LastMessageRegistry.java
│ │ │ └── TgClient.java
│ │ │ ├── Models
│ │ │ ├── Conversations
│ │ │ │ ├── Conversation.java
│ │ │ │ ├── ConversationFactory.java
│ │ │ │ ├── ConversationGroup.java
│ │ │ │ └── ConversationPrivate.java
│ │ │ ├── Country.java
│ │ │ ├── MessageTestModel.java
│ │ │ └── Messages
│ │ │ │ ├── AddParticipantNotification.java
│ │ │ │ ├── AudioChatMessage.java
│ │ │ │ ├── ChatEvent.java
│ │ │ │ ├── ChatEventFactory.java
│ │ │ │ ├── ChatMessage.java
│ │ │ │ ├── DocumentChatMessage.java
│ │ │ │ ├── GeoPointChatMessage.java
│ │ │ │ ├── GroupCreatedNotification.java
│ │ │ │ ├── GroupPhotoChangedNotification.java
│ │ │ │ ├── NewDaySeparatorNotification.java
│ │ │ │ ├── NotImplementedYetChatMessage.java
│ │ │ │ ├── PhotoChatMessage.java
│ │ │ │ ├── StickerChatMessage.java
│ │ │ │ ├── TextChatMessage.java
│ │ │ │ ├── UnreadMessagesBadge.java
│ │ │ │ └── VideoChatMessage.java
│ │ │ ├── TelegramApplication.java
│ │ │ └── Utils
│ │ │ ├── AvatarHelper.java
│ │ │ ├── CenteredImageSpan.java
│ │ │ ├── FileSaveOrCopyHelper.java
│ │ │ ├── FileSizeUnitsHelper.java
│ │ │ ├── ImageHelper.java
│ │ │ ├── PhotoGalleryService.java
│ │ │ ├── RecyclerItemClickListener.java
│ │ │ ├── RoundImage.java
│ │ │ ├── TdFileHelper.java
│ │ │ └── URLSpanNoUnderline.java
│ └── org
│ │ └── drinkless
│ │ └── td
│ │ └── libcore
│ │ └── telegram
│ │ ├── Client.java
│ │ ├── NativeClient.java
│ │ ├── TG.java
│ │ └── TdApi.java
│ ├── jniLibs
│ ├── armeabi-v7a
│ │ └── libtdjni.so
│ └── x86
│ │ └── libtdjni.so
│ └── res
│ ├── anim
│ ├── slide_in_out.xml
│ └── slide_in_up.xml
│ ├── drawable-hdpi
│ ├── drawer_shadow.9.png
│ ├── ic_arrow_down.png
│ ├── ic_attach.png
│ ├── ic_attach_check.png
│ ├── ic_attach_gallery.png
│ ├── ic_attach_photo.png
│ ├── ic_back.png
│ ├── ic_back_photo.png
│ ├── ic_badge.png
│ ├── ic_check.png
│ ├── ic_clock.png
│ ├── ic_download.png
│ ├── ic_download_blue.png
│ ├── ic_drawer.png
│ ├── ic_error.png
│ ├── ic_file.png
│ ├── ic_group.png
│ ├── ic_launcher.png
│ ├── ic_logout.png
│ ├── ic_map_pin.png
│ ├── ic_menu.png
│ ├── ic_more.png
│ ├── ic_more_photo.png
│ ├── ic_msg_panel_kb.png
│ ├── ic_mute.png
│ ├── ic_mute_blue.png
│ ├── ic_pause.png
│ ├── ic_pause_blue.png
│ ├── ic_play.png
│ ├── ic_scroll.png
│ ├── ic_send.png
│ ├── ic_small_arrow.png
│ ├── ic_smiles.png
│ ├── ic_smiles_backspace.png
│ ├── ic_smiles_backspace_active.png
│ ├── ic_smiles_bell.png
│ ├── ic_smiles_bell_active.png
│ ├── ic_smiles_car.png
│ ├── ic_smiles_car_active.png
│ ├── ic_smiles_flower.png
│ ├── ic_smiles_flower_active.png
│ ├── ic_smiles_grid.png
│ ├── ic_smiles_grid_active.png
│ ├── ic_smiles_recent.png
│ ├── ic_smiles_recent_active.png
│ ├── ic_smiles_smile.png
│ ├── ic_smiles_smile_active.png
│ ├── ic_smiles_sticker.png
│ ├── ic_smiles_sticker_active.png
│ └── test.jpg
│ ├── drawable-mdpi
│ ├── drawer_shadow.9.png
│ ├── ic_arrow_down.png
│ ├── ic_attach.png
│ ├── ic_attach_check.png
│ ├── ic_attach_gallery.png
│ ├── ic_attach_photo.png
│ ├── ic_back.png
│ ├── ic_back_photo.png
│ ├── ic_badge.png
│ ├── ic_check.png
│ ├── ic_clock.png
│ ├── ic_download.png
│ ├── ic_download_blue.png
│ ├── ic_drawer.png
│ ├── ic_error.png
│ ├── ic_file.png
│ ├── ic_group.png
│ ├── ic_logout.png
│ ├── ic_map_pin.png
│ ├── ic_menu.png
│ ├── ic_more.png
│ ├── ic_more_photo.png
│ ├── ic_msg_panel_kb.png
│ ├── ic_mute.png
│ ├── ic_mute_blue.png
│ ├── ic_pause.png
│ ├── ic_pause_blue.png
│ ├── ic_play.png
│ ├── ic_scroll.png
│ ├── ic_send.png
│ ├── ic_small_arrow.png
│ ├── ic_smiles.png
│ ├── ic_smiles_backspace.png
│ ├── ic_smiles_backspace_active.png
│ ├── ic_smiles_bell.png
│ ├── ic_smiles_bell_active.png
│ ├── ic_smiles_car.png
│ ├── ic_smiles_car_active.png
│ ├── ic_smiles_flower.png
│ ├── ic_smiles_flower_active.png
│ ├── ic_smiles_grid.png
│ ├── ic_smiles_grid_active.png
│ ├── ic_smiles_recent.png
│ ├── ic_smiles_recent_active.png
│ ├── ic_smiles_smile.png
│ ├── ic_smiles_smile_active.png
│ ├── ic_smiles_sticker.png
│ └── ic_smiles_sticker_active.png
│ ├── drawable-xhdpi
│ ├── drawer_shadow.9.png
│ ├── ic_arrow_down.png
│ ├── ic_attach.png
│ ├── ic_attach_check.png
│ ├── ic_attach_gallery.png
│ ├── ic_attach_photo.png
│ ├── ic_back.png
│ ├── ic_back_photo.png
│ ├── ic_badge.png
│ ├── ic_check.png
│ ├── ic_clock.png
│ ├── ic_download.png
│ ├── ic_download_blue.png
│ ├── ic_drawer.png
│ ├── ic_error.png
│ ├── ic_file.png
│ ├── ic_file_play.png
│ ├── ic_group.png
│ ├── ic_logout.png
│ ├── ic_map_pin.png
│ ├── ic_menu.png
│ ├── ic_more.png
│ ├── ic_more_photo.png
│ ├── ic_msg_panel_kb.png
│ ├── ic_mute.png
│ ├── ic_mute_blue.png
│ ├── ic_pause.png
│ ├── ic_pause_blue.png
│ ├── ic_scroll.png
│ ├── ic_send.png
│ ├── ic_small_arrow.png
│ ├── ic_smiles.png
│ ├── ic_smiles_backspace.png
│ ├── ic_smiles_backspace_active.png
│ ├── ic_smiles_bell.png
│ ├── ic_smiles_bell_active.png
│ ├── ic_smiles_car.png
│ ├── ic_smiles_car_active.png
│ ├── ic_smiles_flower.png
│ ├── ic_smiles_flower_active.png
│ ├── ic_smiles_grid.png
│ ├── ic_smiles_grid_active.png
│ ├── ic_smiles_recent.png
│ ├── ic_smiles_recent_active.png
│ ├── ic_smiles_smile.png
│ ├── ic_smiles_smile_active.png
│ ├── ic_smiles_sticker.png
│ └── ic_smiles_sticker_active.png
│ ├── drawable-xxhdpi
│ ├── drawer_shadow.9.png
│ ├── ic_arrow_down.png
│ ├── ic_attach.png
│ ├── ic_attach_check.png
│ ├── ic_attach_gallery.png
│ ├── ic_attach_photo.png
│ ├── ic_back.png
│ ├── ic_back_photo.png
│ ├── ic_badge.png
│ ├── ic_check.png
│ ├── ic_clock.png
│ ├── ic_download.png
│ ├── ic_download_blue.png
│ ├── ic_drawer.png
│ ├── ic_error.png
│ ├── ic_file.png
│ ├── ic_file_pause_blue.png
│ ├── ic_group.png
│ ├── ic_logout.png
│ ├── ic_map_pin.png
│ ├── ic_menu.png
│ ├── ic_more.png
│ ├── ic_more_photo.png
│ ├── ic_msg_panel_kb.png
│ ├── ic_pause.png
│ ├── ic_play.png
│ ├── ic_scroll.png
│ ├── ic_send.png
│ ├── ic_small_arrow.png
│ ├── ic_smiles.png
│ ├── ic_smiles_backspace.png
│ ├── ic_smiles_backspace_active.png
│ ├── ic_smiles_bell.png
│ ├── ic_smiles_bell_active.png
│ ├── ic_smiles_car.png
│ ├── ic_smiles_car_active.png
│ ├── ic_smiles_flower.png
│ ├── ic_smiles_flower_active.png
│ ├── ic_smiles_grid.png
│ ├── ic_smiles_grid_active.png
│ ├── ic_smiles_recent.png
│ ├── ic_smiles_recent_active.png
│ ├── ic_smiles_smile.png
│ ├── ic_smiles_smile_active.png
│ ├── ic_smiles_sticker.png
│ ├── ic_smiles_sticker_active.png
│ ├── mute.png
│ ├── mute_blue.png
│ └── test_avatar.jpg
│ ├── drawable
│ ├── circular_progress_bar_blue.xml
│ ├── circular_progress_bar_white.xml
│ ├── forward_line.9.png
│ ├── ic_unread.png
│ ├── list_divider.xml
│ ├── roundedbutton.xml
│ ├── roundedbutton_download.xml
│ ├── roundedbutton_download_image.xml
│ ├── seek_bar.xml
│ └── seek_bar_thumb.xml
│ ├── layout
│ ├── activity_activation.xml
│ ├── activity_chat.xml
│ ├── activity_conversations.xml
│ ├── activity_countries.xml
│ ├── activity_image_view.xml
│ ├── activity_registration.xml
│ ├── chat_toolbar.xml
│ ├── fragment_attach_files.xml
│ ├── fragment_main.xml
│ ├── fragment_navigation_drawer.xml
│ ├── item_chat.xml
│ ├── item_choose_photo.xml
│ ├── item_conversations.xml
│ ├── item_country.xml
│ ├── msg_audio.xml
│ ├── msg_document.xml
│ ├── msg_downloading.xml
│ ├── msg_geo_point.xml
│ ├── msg_image.xml
│ ├── msg_save_file.xml
│ ├── msg_sticker.xml
│ └── msg_video.xml
│ ├── menu
│ ├── activation_code.xml
│ ├── chat.xml
│ ├── country.xml
│ ├── global.xml
│ ├── image_view.xml
│ └── login_phone.xml
│ ├── values-v16
│ └── styles.xml
│ ├── values-w820dp
│ └── dimens.xml
│ └── values
│ ├── colors.xml
│ ├── country_codes.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
├── audio.mp3
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── kelegram.iml
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | /.idea/libraries
5 | .DS_Store
6 | /build
7 | /captures
8 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | Telegram
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | 1.7
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/scopes/scope_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Telegram
2 | Telegram Challenge, round 1
3 |
4 | The task for round 1:
5 | create a simple messanger based on Telegram API, using library TDLib, with the following functionality: login\sign up, send message, photo, audio, map, forward message and load conversations and chat history.
6 |
7 | Supported versions 4.x и 5.x OC Android.
8 |
9 |
10 | P.S. Last update TdLib - may 19, 2015
11 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 22
5 | buildToolsVersion "22.0.1"
6 |
7 | defaultConfig {
8 | applicationId "com.katy.telegram"
9 | minSdkVersion 15
10 | targetSdkVersion 22
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | repositories {
23 | mavenCentral()
24 | }
25 |
26 | dependencies {
27 | compile fileTree(dir: 'libs', include: ['*.jar'])
28 | compile 'com.android.support:appcompat-v7:22.1.0'
29 | compile 'com.android.support:recyclerview-v7:22.1.1'
30 | compile 'com.github.chrisbanes.photoview:library:1.2.3'
31 | compile 'com.jakewharton:butterknife:6.1.0'
32 | //compile 'io.reactivex:rxandroid:0.24.0'
33 | compile 'de.greenrobot:eventbus:2.4.0'
34 | }
35 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\Egorbo\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Activities/ActivationActivity.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Activities;
2 |
3 | import android.content.Intent;
4 | import android.graphics.Color;
5 | import android.os.Bundle;
6 | import android.support.v7.widget.Toolbar;
7 | import android.view.Menu;
8 | import android.view.MenuItem;
9 | import android.view.View;
10 | import android.widget.EditText;
11 | import android.widget.TextView;
12 |
13 | import com.katy.telegram.Managers.AccountManager;
14 | import com.katy.telegram.Managers.TgClient;
15 | import com.katy.telegram.R;
16 |
17 | import org.drinkless.td.libcore.telegram.TdApi;
18 |
19 | import butterknife.ButterKnife;
20 | import butterknife.InjectView;
21 | import butterknife.OnTextChanged;
22 |
23 | public class ActivationActivity extends BaseActivity implements TgClient.TLResponseCallback {
24 |
25 | private static final int ACTIVATION_CODE_LENGTH = 5;
26 |
27 | @InjectView(R.id.toolbar)
28 | Toolbar toolbar;
29 | @InjectView(R.id.activation_information)
30 | TextView activationInformation;
31 | @InjectView(R.id.code)
32 | EditText code;
33 | @InjectView(R.id.edittext_line)
34 | View edittextLine;
35 | @InjectView(R.id.wrong_code)
36 | TextView wrongCode;
37 |
38 | @OnTextChanged(value = R.id.code)
39 | void onActivationCodeChanged(CharSequence text) {
40 | edittextLine.setBackgroundColor(getResources().getColor(R.color.background_blue));
41 | wrongCode.setVisibility(View.GONE);
42 | if (text.length() == ACTIVATION_CODE_LENGTH) {
43 | doActivate();
44 | }
45 | }
46 |
47 | @Override
48 | protected void onCreate(Bundle savedInstanceState) {
49 | super.onCreate(savedInstanceState);
50 | setContentView(R.layout.activity_activation);
51 | ButterKnife.inject(this);
52 |
53 | toolbar.setTitle(getResources().getString(R.string.label_activation_code));
54 | toolbar.setTitleTextColor(Color.WHITE);
55 | toolbar.setNavigationIcon(getResources().getDrawable(R.drawable.ic_back));
56 | setSupportActionBar(toolbar);
57 |
58 | activationInformation.setText(activationInformation.getText() + " " + AccountManager.getInstance().getCurrentPhoneNumber());
59 | }
60 |
61 | @Override
62 | public boolean onCreateOptionsMenu(Menu menu) {
63 | getMenuInflater().inflate(R.menu.activation_code, menu);
64 | return true;
65 | }
66 |
67 | @Override
68 | public boolean onOptionsItemSelected(MenuItem item) {
69 | int id = item.getItemId();
70 | if (id == R.id.action_check) {
71 | doActivate();
72 | return true;
73 | } else {
74 | startActivity(new Intent(getApplicationContext(), RegistrationActivity.class));
75 | return super.onOptionsItemSelected(item);
76 | }
77 | }
78 |
79 | private void doActivate() {
80 | if (isBusy())
81 | return;
82 |
83 | showProgress(true);
84 | TdApi.AuthSetCode authSetCode = new TdApi.AuthSetCode(code.getText().toString());
85 | TgClient.send(authSetCode, this);
86 | }
87 |
88 | @Override
89 | public void onResult(TdApi.TLObject object) {
90 | if (object.getConstructor() == TdApi.AuthStateOk.CONSTRUCTOR) {
91 | Intent intent = new Intent(getApplicationContext(), ConversationsActivity.class);
92 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
93 | startActivity(intent);
94 | } else {
95 | wrongCode.setVisibility(View.VISIBLE);
96 | edittextLine.setBackgroundColor(getResources().getColor(R.color.color_error_message));
97 | }
98 | showProgress(false);
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Activities/BaseActivity.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Activities;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.ActionBarActivity;
5 | import android.view.View;
6 | import android.widget.ProgressBar;
7 |
8 | import com.katy.telegram.R;
9 |
10 | public class BaseActivity extends ActionBarActivity {
11 |
12 | private static BaseActivity currentActivity = null;
13 | private ProgressBar progressBar;
14 | private boolean isBusy;
15 |
16 | public static BaseActivity getCurrentActivity() {
17 | return currentActivity;
18 | }
19 |
20 | @Override
21 | protected void onCreate(Bundle savedInstanceState) {
22 | currentActivity = this;
23 | super.onCreate(savedInstanceState);
24 | }
25 |
26 | protected boolean isBusy() {
27 | return isBusy;
28 | }
29 |
30 | protected void showProgress(boolean show) {
31 | isBusy = show;
32 | if (progressBar == null) {
33 | progressBar = (ProgressBar) findViewById(R.id.progress_spinner);
34 | }
35 | progressBar.setVisibility(show ? View.VISIBLE : View.GONE);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Activities/CountriesListActivity.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Activities;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.graphics.Color;
6 | import android.os.Bundle;
7 | import android.support.annotation.Nullable;
8 | import android.support.v7.widget.Toolbar;
9 | import android.view.View;
10 | import android.widget.AdapterView;
11 | import android.widget.ListView;
12 | import android.widget.RelativeLayout;
13 | import android.widget.TextView;
14 |
15 | import com.katy.telegram.Adapters.CountryAdapter;
16 | import com.katy.telegram.R;
17 |
18 | import butterknife.ButterKnife;
19 | import butterknife.InjectView;
20 | import butterknife.OnClick;
21 |
22 | public class CountriesListActivity extends BaseActivity {
23 |
24 | @InjectView(R.id.toolbar)
25 | Toolbar toolbar;
26 | @OnClick(R.id.toolbar) void cancelResult() {
27 | setResult(Activity.RESULT_CANCELED);
28 | finish();
29 | }
30 | @InjectView(R.id.countries_list)
31 | ListView countriesList;
32 |
33 | @Override
34 | protected void onCreate(@Nullable Bundle savedInstanceState) {
35 | super.onCreate(savedInstanceState);
36 | setContentView(R.layout.activity_countries);
37 | ButterKnife.inject(this);
38 |
39 | toolbar.setTitle(getResources().getString(R.string.label_country));
40 | toolbar.setTitleTextColor(Color.WHITE);
41 | toolbar.setNavigationIcon(getResources().getDrawable(R.drawable.ic_back));
42 |
43 | CountryAdapter countryAdapter = new CountryAdapter(this);
44 | countriesList.setAdapter(countryAdapter);
45 |
46 | countriesList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
47 | @Override
48 | public void onItemClick(AdapterView> parent, View view, int position, long id) {
49 | TextView name = (TextView) ((RelativeLayout) view).getChildAt(1);
50 | TextView code = (TextView) ((RelativeLayout) view).getChildAt(2);
51 | Intent intent = new Intent();
52 | intent.putExtra("name", name.getText().toString());
53 | intent.putExtra("code", code.getText().toString());
54 | setResult(Activity.RESULT_OK, intent);
55 | finish();
56 | }
57 | });
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Activities/ImageViewActivity.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Activities;
2 |
3 | import android.app.Activity;
4 | import android.content.ContentValues;
5 | import android.graphics.BitmapFactory;
6 | import android.os.Bundle;
7 | import android.provider.MediaStore;
8 | import android.support.annotation.Nullable;
9 | import android.support.v7.widget.Toolbar;
10 | import android.view.Menu;
11 | import android.view.MenuItem;
12 | import android.view.View;
13 | import android.widget.ImageView;
14 | import android.widget.Toast;
15 |
16 | import com.katy.telegram.R;
17 |
18 | import java.io.File;
19 |
20 | import butterknife.ButterKnife;
21 | import butterknife.InjectView;
22 | import uk.co.senab.photoview.PhotoViewAttacher;
23 |
24 | public class ImageViewActivity extends BaseActivity {
25 |
26 | @InjectView(R.id.toolbar)
27 | Toolbar toolbar;
28 | @InjectView(R.id.image)
29 | ImageView image;
30 |
31 | private PhotoViewAttacher mAttacher;
32 | private String imagePath;
33 |
34 | @Override
35 | protected void onCreate(@Nullable Bundle savedInstanceState) {
36 | super.onCreate(savedInstanceState);
37 | setContentView(R.layout.activity_image_view);
38 | ButterKnife.inject(this);
39 |
40 | toolbar.setNavigationIcon(this.getResources().getDrawable(R.drawable.ic_back));
41 | toolbar.setNavigationIcon(getResources().getDrawable(R.drawable.ic_back));
42 | toolbar.getBackground().setAlpha(1);
43 | setSupportActionBar(toolbar);
44 | getSupportActionBar().setTitle(null);
45 | toolbar.setNavigationOnClickListener(new View.OnClickListener() {
46 | @Override
47 | public void onClick(View v) {
48 | setResult(Activity.RESULT_CANCELED);
49 | finish();
50 | }
51 | });
52 |
53 | imagePath = getIntent().getStringExtra("imagePath");
54 | image.setImageBitmap(BitmapFactory.decodeFile(imagePath));
55 |
56 | mAttacher = new PhotoViewAttacher(image);
57 | }
58 |
59 | @Override
60 | public boolean onCreateOptionsMenu(Menu menu) {
61 | getMenuInflater().inflate(R.menu.image_view, menu);
62 | getSupportActionBar().setTitle(null);
63 | return true;
64 | }
65 |
66 | @Override
67 | public boolean onOptionsItemSelected(MenuItem item) {
68 | int id = item.getItemId();
69 | if (id == R.id.save_to_gallery) {
70 | ContentValues values = new ContentValues();
71 | values.put(MediaStore.Images.Media.MIME_TYPE, "image/jpeg");
72 | values.put(MediaStore.MediaColumns.DATA, imagePath);
73 | getApplicationContext().getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
74 | Toast.makeText(getApplicationContext(), "File is saved", Toast.LENGTH_SHORT).show();
75 | } else if (id == R.id.delete) {
76 | File file = new File(imagePath); //android.os.Environment.getExternalStorageDirectory() + imagePath);
77 | if (file.exists()) {
78 | file.delete();
79 | Toast.makeText(getApplicationContext(), "Deleted", Toast.LENGTH_SHORT).show();
80 | }
81 | }
82 | return super.onOptionsItemSelected(item);
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Activities/RegistrationActivity.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Activities;
2 |
3 | import android.content.Intent;
4 | import android.graphics.Color;
5 | import android.os.Bundle;
6 | import android.support.v7.widget.Toolbar;
7 | import android.view.Menu;
8 | import android.view.MenuItem;
9 | import android.widget.EditText;
10 | import android.widget.TextView;
11 | import android.widget.Toast;
12 |
13 | import com.katy.telegram.Managers.AccountManager;
14 | import com.katy.telegram.Managers.CountriesManager;
15 | import com.katy.telegram.Managers.TgClient;
16 | import com.katy.telegram.R;
17 |
18 | import org.drinkless.td.libcore.telegram.TdApi;
19 |
20 | import butterknife.ButterKnife;
21 | import butterknife.InjectView;
22 | import butterknife.OnClick;
23 | import butterknife.OnTextChanged;
24 |
25 | public class RegistrationActivity extends BaseActivity implements TgClient.TLResponseCallback {
26 |
27 | @InjectView(R.id.country_code)
28 | TextView country_code;
29 | @InjectView(R.id.phone_number)
30 | EditText phone_number;
31 | @InjectView(R.id.toolbar)
32 | Toolbar toolbar;
33 | @InjectView(R.id.country_name)
34 | TextView country_name;
35 |
36 | private String phone;
37 |
38 | @OnClick(R.id.country_name)
39 | void chooseCountryName() {
40 | Intent intent = new Intent(RegistrationActivity.this, CountriesListActivity.class);
41 | startActivityForResult(intent, RESULT_FIRST_USER);
42 | }
43 |
44 | @OnClick(R.id.country_code)
45 | void chooseCountryCode() {
46 | chooseCountryName(); //do the same
47 | }
48 |
49 | @OnTextChanged(value = R.id.country_code)
50 | void onCountryCodeChanged(CharSequence text) {
51 | country_name.setText(CountriesManager.getInstance().getCountryByCode(text.toString()));
52 | }
53 |
54 | @Override
55 | protected void onCreate(Bundle savedInstanceState) {
56 | super.onCreate(savedInstanceState);
57 | CountriesManager.getInstance().preloadCountries();
58 | setContentView(R.layout.activity_registration);
59 | ButterKnife.inject(this);
60 |
61 | toolbar.setTitle(getResources().getString(R.string.label_phone_number));
62 | toolbar.setTitleTextColor(Color.WHITE);
63 | setSupportActionBar(toolbar);
64 | }
65 |
66 | @Override
67 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
68 | super.onActivityResult(requestCode, resultCode, data);
69 | if (resultCode == RESULT_OK) {
70 | country_name.setText(data.getStringExtra("name"));
71 | country_code.setText(data.getStringExtra("code"));
72 | }
73 | }
74 |
75 | @Override
76 | public boolean onCreateOptionsMenu(Menu menu) {
77 | getMenuInflater().inflate(R.menu.login_phone, menu);
78 | return true;
79 | }
80 |
81 | @Override
82 | public boolean onOptionsItemSelected(MenuItem item) {
83 | int id = item.getItemId();
84 | if (id == R.id.action_check) {
85 | doRegister();
86 | return true;
87 | }
88 | return super.onOptionsItemSelected(item);
89 | }
90 |
91 | private void doRegister() {
92 | if (isBusy())
93 | return;
94 |
95 | phone = phone_number.getText().toString();
96 | if (!phone.equals("")) {
97 | showProgress(true);
98 | TdApi.AuthSetPhoneNumber smsSender = new TdApi.AuthSetPhoneNumber(country_code.getText().toString() + phone);
99 | TgClient.send(smsSender, this);
100 | } else {
101 | reportWrongNumberError();
102 | }
103 | }
104 |
105 | private void reportWrongNumberError() {
106 | Toast.makeText(this, "Invalid phone number", Toast.LENGTH_SHORT).show();
107 | }
108 |
109 | @Override
110 | public void onResult(TdApi.TLObject object) {
111 | if (object.getConstructor() == TdApi.AuthStateWaitSetCode.CONSTRUCTOR) {
112 | AccountManager.getInstance().setCurrentPhoneNumber(country_code.getText().toString() + phone);
113 | Intent intent = new Intent(getApplicationContext(), ActivationActivity.class);
114 | intent.putExtra("phone", country_code.getText().toString() + phone);
115 | startActivity(intent);
116 | } else {
117 | reportWrongNumberError();
118 | }
119 | showProgress(false);
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Activities/SplashScreenActivity.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Activities;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 |
7 | import com.katy.telegram.Activities.ActivationActivity;
8 | import com.katy.telegram.Activities.RegistrationActivity;
9 | import com.katy.telegram.Activities.ConversationsActivity;
10 | import com.katy.telegram.Managers.TgClient;
11 |
12 | import org.drinkless.td.libcore.telegram.TdApi;
13 |
14 | public class SplashScreenActivity extends Activity implements TgClient.TLResponseCallback {
15 |
16 | @Override
17 | protected void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | TdApi.AuthGetState authStateRequest = new TdApi.AuthGetState();
20 | TgClient.send(authStateRequest, this);
21 | }
22 |
23 | @Override
24 | public void onResult(TdApi.TLObject object) {
25 | if (object instanceof TdApi.AuthStateOk) {
26 | startActivity(new Intent(getApplicationContext(), ConversationsActivity.class));
27 | }
28 | else if (object instanceof TdApi.AuthStateWaitSetCode) {
29 | startActivity(new Intent(getApplicationContext(), ActivationActivity.class));
30 | }
31 | else if (object instanceof TdApi.AuthStateWaitSetPhoneNumber) {
32 | startActivity(new Intent(getApplicationContext(), RegistrationActivity.class));
33 | }
34 | else if (object instanceof TdApi.Error) {
35 | TgClient.send(new TdApi.AuthReset(), this);
36 | }
37 | else {
38 | startActivity(new Intent(getApplicationContext(), RegistrationActivity.class));
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Adapters/CountryAdapter.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Adapters;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.BaseAdapter;
8 | import android.widget.TextView;
9 |
10 | import com.katy.telegram.Managers.CountriesManager;
11 | import com.katy.telegram.Models.Country;
12 | import com.katy.telegram.R;
13 |
14 | import java.util.ArrayList;
15 | import java.util.List;
16 | import java.util.Locale;
17 |
18 | public class CountryAdapter extends BaseAdapter {
19 |
20 | private List counties;
21 | private LayoutInflater layoutInflater;
22 | private Context context;
23 |
24 | public class ViewHolder {
25 | TextView textAlphabetLetter;
26 | TextView textCountryName;
27 | TextView textCountryCode;
28 | }
29 |
30 | public CountryAdapter(Context context) {
31 | this.context = context;
32 | layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
33 | counties = CountriesManager.getInstance().getList();
34 | }
35 |
36 | @Override
37 | public int getCount() {
38 | return counties.size();
39 | }
40 |
41 | @Override
42 | public Object getItem(int position) {
43 | return counties.get(position);
44 | }
45 |
46 | @Override
47 | public long getItemId(int position) {
48 | return position;
49 | }
50 |
51 | @Override
52 | public View getView(int position, View convertView, ViewGroup parent) {
53 | ViewHolder viewHolder;
54 |
55 | if (convertView == null) {
56 | convertView = layoutInflater.inflate(R.layout.item_country, parent, false);
57 | viewHolder = new ViewHolder();
58 | viewHolder.textAlphabetLetter = (TextView) convertView.findViewById(R.id.letter);
59 | viewHolder.textCountryName = (TextView) convertView.findViewById(R.id.country_name);
60 | viewHolder.textCountryCode = (TextView) convertView.findViewById(R.id.country_code);
61 |
62 | convertView.setTag(viewHolder);
63 | } else {
64 | viewHolder = (ViewHolder) convertView.getTag();
65 | }
66 |
67 | Country country = counties.get(position);
68 | boolean toShowFirstLetter;
69 | if (position == 0) {
70 | toShowFirstLetter = true;//always show it for the first element
71 | } else {
72 | char letterOfPrev = counties.get(position - 1).getName().charAt(0);
73 | char letterOfThis = country.getName().charAt(0);
74 | toShowFirstLetter = letterOfPrev != letterOfThis;
75 | }
76 |
77 | viewHolder.textAlphabetLetter.setText(toShowFirstLetter ? country.getName().substring(0, 1) : " ");
78 | viewHolder.textCountryName.setText(country.getName());
79 | viewHolder.textCountryCode.setText(country.getCode());
80 |
81 | return convertView;
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Managers/AccountManager.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Managers;
2 |
3 | import android.content.Intent;
4 | import android.content.SharedPreferences;
5 | import android.preference.PreferenceManager;
6 |
7 | import com.katy.telegram.Activities.BaseActivity;
8 | import com.katy.telegram.Activities.SplashScreenActivity;
9 |
10 | import org.drinkless.td.libcore.telegram.TdApi;
11 |
12 | import java.util.concurrent.CountDownLatch;
13 |
14 | import de.greenrobot.event.EventBus;
15 |
16 | public class AccountManager {
17 | private static AccountManager instance;
18 | private TdApi.User currentUser;
19 | private boolean loadInitiated;
20 | private String phoneNumber;
21 |
22 | private AccountManager() {
23 | }
24 |
25 | public static AccountManager getInstance() {
26 | if (instance == null) {
27 | synchronized (AccountManager.class) {
28 | if (instance == null) {
29 | instance = new AccountManager();
30 | EventBus.getDefault().register(instance);
31 | }
32 | return instance;
33 | }
34 | }
35 | return instance;
36 | }
37 |
38 | public TdApi.User getCurrentUser() {
39 | if (currentUser == null) {
40 | synchronized (AccountManager.class) {
41 | loadCurrentUser();
42 | }
43 | }
44 | return currentUser;
45 | }
46 |
47 | public String getCurrentPhoneNumber(){
48 | if (phoneNumber == null){
49 | phoneNumber = PreferenceManager.getDefaultSharedPreferences(BaseActivity.getCurrentActivity()).getString("phone", null);
50 | }
51 | return phoneNumber;
52 | }
53 |
54 | public void setCurrentPhoneNumber(String phoneNumber){
55 | this.phoneNumber = phoneNumber;
56 | SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(BaseActivity.getCurrentActivity()).edit();
57 | editor.putString("phone", phoneNumber);
58 | editor.apply();
59 | }
60 |
61 | public void loadCurrentUser() {
62 | if (loadInitiated) {
63 | return;
64 | }
65 | loadInitiated = true;
66 |
67 | final CountDownLatch latch = new CountDownLatch(1);
68 | TgClient.send(new TdApi.GetMe(), new TgClient.TLResponseCallback() {
69 | @Override
70 | public void onResult(final TdApi.TLObject object) {
71 | if (object instanceof TdApi.User) {
72 | currentUser = (TdApi.User) object;
73 | if (currentUser.photoSmall instanceof TdApi.FileEmpty) {
74 | TdApi.DownloadFile downloadFile = new TdApi.DownloadFile(((TdApi.FileEmpty) currentUser.photoSmall).id);
75 | TgClient.send(downloadFile, this);
76 | }
77 | if (currentUser.photoBig instanceof TdApi.FileEmpty) {
78 | TdApi.DownloadFile downloadFile = new TdApi.DownloadFile(((TdApi.FileEmpty) currentUser.photoBig).id);
79 | TgClient.send(downloadFile, this);
80 | }
81 | latch.countDown();
82 | }
83 | }
84 | }, false);
85 | try {
86 | latch.await();
87 | } catch (InterruptedException e) {
88 | // pass
89 | }
90 | }
91 |
92 | public void onEventMainThread(TdApi.UpdateFile file) {
93 | if (currentUser.photoSmall instanceof TdApi.FileEmpty) {
94 | if (file.fileId == ((TdApi.FileEmpty) currentUser.photoSmall).id) {
95 | currentUser.photoSmall = new TdApi.FileLocal(file.fileId, file.size, file.path);
96 | EventBus.getDefault().post(this);
97 | }
98 | } else if (currentUser.photoBig instanceof TdApi.FileEmpty) {
99 | if (file.fileId == ((TdApi.FileEmpty) currentUser.photoBig).id) {
100 | currentUser.photoBig = new TdApi.FileLocal(file.fileId, file.size, file.path);
101 | EventBus.getDefault().post(this);
102 | }
103 | }
104 | }
105 |
106 | public void logout() {
107 | TdApi.AuthReset authReset = new TdApi.AuthReset(false);
108 | TgClient.send(authReset, new TgClient.TLResponseCallback() {
109 | @Override
110 | public void onResult(TdApi.TLObject object) {
111 | setCurrentPhoneNumber(null);
112 | BaseActivity currentActivity = BaseActivity.getCurrentActivity();
113 | Intent intent = new Intent(currentActivity.getApplicationContext(), SplashScreenActivity.class);
114 | intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
115 | currentActivity.startActivity(intent);
116 | }
117 | });
118 | }
119 | }
120 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Managers/ChatsManager.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Managers;
2 |
3 | import org.drinkless.td.libcore.telegram.TdApi;
4 |
5 | import java.util.ArrayList;
6 | import java.util.HashMap;
7 | import java.util.List;
8 |
9 | public class ChatsManager {
10 | private HashMap chatsMap = new HashMap<>();
11 | private HashMap lastReadOutboxMap = new HashMap<>();
12 | private static ChatsManager chatsManager;
13 |
14 | public static ChatsManager getInstance() {
15 | if (chatsManager == null) {
16 | synchronized (ChatsManager.class) {
17 | if (chatsManager == null) {
18 | chatsManager = new ChatsManager();
19 | }
20 | }
21 | }
22 | return chatsManager;
23 | }
24 |
25 | private ChatsManager() {
26 | }
27 |
28 | public void getChat(Long chatId, final Callback callback) {
29 | TdApi.Chat existingChat = chatsMap.get(chatId);
30 | if (existingChat != null) {
31 | callback.onResult(existingChat);
32 | return;
33 | }
34 | TdApi.GetChat getChat = new TdApi.GetChat(chatId);
35 | TgClient.send(getChat, new TgClient.TLResponseCallback() {
36 | @Override
37 | public void onResult(TdApi.TLObject object) {
38 | TdApi.Chat chat = (TdApi.Chat) object;
39 | chatsMap.put(chat.id, chat);
40 | callback.onResult(chat);
41 | }
42 | });
43 | }
44 |
45 | public void getChats(final Callback> callback) {
46 | TdApi.GetChats getChats = new TdApi.GetChats(0, 20); //temporarily, TODO: implement incremental loading
47 | TgClient.send(getChats, new TgClient.TLResponseCallback() {
48 | @Override
49 | public void onResult(TdApi.TLObject object) {
50 | List result = new ArrayList<>();
51 | for (TdApi.Chat chat : ((TdApi.Chats) object).chats) {
52 | LastMessageRegistry.getInstance().setLastMessageId(chat.topMessage.chatId, chat.topMessage.id);
53 | chatsMap.put(chat.id, chat);
54 | result.add(chat);
55 | }
56 | callback.onResult(result);
57 | }
58 | });
59 | }
60 |
61 | public void setLastReadOutboxMap(HashMap lastReadOutboxMap){
62 | this.lastReadOutboxMap = lastReadOutboxMap;
63 | }
64 |
65 | public HashMap getLastReadOutboxMap() {
66 | return lastReadOutboxMap;
67 | }
68 |
69 | public interface Callback {
70 | void onResult(T result);
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Managers/CountriesManager.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Managers;
2 |
3 | import com.katy.telegram.Activities.BaseActivity;
4 | import com.katy.telegram.Models.Country;
5 | import com.katy.telegram.R;
6 |
7 | import java.util.ArrayList;
8 | import java.util.Locale;
9 |
10 | public class CountriesManager {
11 | private boolean preloaded;
12 | private ArrayList countries;
13 | private static CountriesManager instance;
14 |
15 | private CountriesManager() {
16 | }
17 |
18 | public static CountriesManager getInstance() {
19 | if (instance == null) {
20 | synchronized (CountriesManager.class) {
21 | if (instance == null) {
22 | instance = new CountriesManager();
23 | }
24 | return instance;
25 | }
26 | }
27 | return instance;
28 | }
29 |
30 | public void preloadCountries(){
31 | if (preloaded)
32 | return;
33 | preloaded = true;
34 |
35 | countries = new ArrayList<>();
36 | String[] resource = BaseActivity.getCurrentActivity().getResources().getStringArray(R.array.country_codes);
37 | for (String row : resource) {
38 | String[] details = row.split(",");
39 | countries.add(new Country(new Locale("", details[1]).getDisplayCountry(), details[0]));
40 | }
41 | }
42 |
43 | public ArrayList getList(){
44 | preloadCountries();
45 | return countries;
46 | }
47 |
48 | public String getCountryByCode(String code){
49 | preloadCountries();
50 | for (Country country : countries) {
51 | if (country.getCode().equals(code)){
52 | return country.getName();
53 | }
54 | }
55 | return " ";
56 | }
57 |
58 | public void guessCurrentCountry(){//add callback
59 | throw new UnsupportedOperationException();
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Managers/LastMessageRegistry.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Managers;
2 |
3 | import org.drinkless.td.libcore.telegram.TdApi;
4 |
5 | import java.util.HashMap;
6 |
7 | import de.greenrobot.event.EventBus;
8 |
9 | /**
10 | * Created by Egorbo on 19.05.2015.
11 | */
12 | public class LastMessageRegistry {
13 |
14 | private static HashMap chatAndMsgMap = new HashMap<>();
15 | private static LastMessageRegistry instance;
16 |
17 | private LastMessageRegistry() {
18 | }
19 |
20 | public static LastMessageRegistry getInstance() {
21 | if (instance == null) {
22 | synchronized (LastMessageRegistry.class) {
23 | if (instance == null) {
24 | instance = new LastMessageRegistry();
25 | EventBus.getDefault().register(instance);
26 | }
27 | return instance;
28 | }
29 | }
30 | return instance;
31 | }
32 |
33 | public void onEvent(TdApi.UpdateNewMessage newMessage){
34 | setLastMessageId(newMessage.message.chatId, newMessage.message.id);
35 | }
36 |
37 | public void setLastMessageId(long chatId, Integer messageId){
38 | synchronized (chatAndMsgMap){
39 | Integer msgId = chatAndMsgMap.get(chatId);
40 | msgId = Math.max(msgId == null ? 0 : msgId, messageId);
41 | msgId = msgId <= 0 ? 10000000 : msgId;
42 | chatAndMsgMap.put(chatId, msgId);
43 | }
44 | }
45 |
46 | public int getLastMessageId(long chatId){
47 | synchronized (chatAndMsgMap){
48 | return 10000000;
49 | //seems like a bug in TD lib :(
50 | //Integer value = chatAndMsgMap.get(chatId);
51 | //return value == null || value <= 0 ? 10000000 : value;
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Managers/TgClient.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Managers;
2 |
3 | import com.katy.telegram.Activities.BaseActivity;
4 |
5 | import org.drinkless.td.libcore.telegram.Client;
6 | import org.drinkless.td.libcore.telegram.TG;
7 | import org.drinkless.td.libcore.telegram.TdApi;
8 |
9 | public class TgClient {
10 | public static void send(TdApi.TLFunction function, final TLResponseCallback callback, final boolean toUiThread){
11 | TG.getClientInstance().send(function, new Client.ResultHandler() {
12 | @Override
13 | public void onResult(final TdApi.TLObject object) {
14 | if (callback == null){
15 | return;
16 | }
17 |
18 | if (toUiThread && BaseActivity.getCurrentActivity() != null){
19 | BaseActivity.getCurrentActivity().runOnUiThread(new Runnable() {
20 | @Override
21 | public void run() {
22 | callback.onResult(object);
23 | }
24 | });
25 | } else {
26 | callback.onResult(object);
27 | }
28 | }
29 | });
30 | }
31 |
32 | public static void send(TdApi.TLFunction function, final TLResponseCallback callback){
33 | send(function, callback, true);
34 | }
35 |
36 | public static void send(TdApi.TLFunction function){
37 | send(function, null, true);
38 | }
39 |
40 | public interface TLResponseCallback {
41 | void onResult(TdApi.TLObject object);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/Conversations/ConversationFactory.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models.Conversations;
2 |
3 | import org.drinkless.td.libcore.telegram.TdApi;
4 |
5 | import de.greenrobot.event.EventBus;
6 |
7 | public class ConversationFactory {
8 |
9 | public static Conversation create(TdApi.Chat chat) {
10 | Conversation conversation = null;
11 | if (chat.type instanceof TdApi.PrivateChatInfo) {
12 | conversation = new ConversationPrivate(chat);
13 | } else //if chat.type instanceof TdApi.GroupChatInfo
14 | {
15 | conversation = new ConversationGroup(chat);
16 | }
17 | EventBus.getDefault().register(conversation);
18 | return conversation;
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/Conversations/ConversationGroup.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models.Conversations;
2 |
3 | import com.katy.telegram.Adapters.ConversationsAdapter;
4 | import com.katy.telegram.Managers.TgClient;
5 | import com.katy.telegram.Utils.TdFileHelper;
6 |
7 | import org.drinkless.td.libcore.telegram.TdApi;
8 |
9 | public class ConversationGroup extends Conversation {
10 | public ConversationGroup(TdApi.Chat chat) {
11 | super(chat);
12 | }
13 |
14 | @Override
15 | public void onViewAttached(ConversationsAdapter.ViewHolder holder) {
16 | super.onViewAttached(holder);
17 | startDownloadingImages();
18 | }
19 |
20 | private void startDownloadingImages() {
21 | TdApi.File photoSmall = getChatGroup().groupChat.photoSmall;
22 | TdFileHelper.getInstance().getFile(photoSmall, true);
23 | }
24 |
25 | public TdApi.GroupChatInfo getChatGroup() {
26 | return (TdApi.GroupChatInfo) getChat().type;
27 | }
28 |
29 | public void onEventMainThread(TdApi.UpdateFile file) {
30 | if (!TdFileHelper.sameId(getChatGroup().groupChat.photoSmall, file.fileId))
31 | return;
32 |
33 | getChatGroup().groupChat.photoSmall = new TdApi.FileLocal(file.fileId, file.size, file.path);
34 | if (getAssignedViewHolder() != null) {
35 | setChatAvatar(file.path, getChatGroup().groupChat.title, getAssignedViewHolder());
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/Conversations/ConversationPrivate.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models.Conversations;
2 |
3 | import com.katy.telegram.Adapters.ConversationsAdapter;
4 | import com.katy.telegram.Managers.TgClient;
5 | import com.katy.telegram.Utils.TdFileHelper;
6 |
7 | import org.drinkless.td.libcore.telegram.TdApi;
8 |
9 | public class ConversationPrivate extends Conversation {
10 |
11 | public ConversationPrivate(TdApi.Chat chat) {
12 | super(chat);
13 | }
14 |
15 | @Override
16 | public void onViewAttached(ConversationsAdapter.ViewHolder holder) {
17 | super.onViewAttached(holder);
18 | startDownloadingImages();
19 | }
20 |
21 | private void startDownloadingImages() {
22 | TdApi.File photoSmall = getPrivateChatInfo().user.photoSmall;
23 | TdFileHelper.getInstance().getFile(photoSmall, true);
24 | }
25 |
26 | public TdApi.PrivateChatInfo getPrivateChatInfo() {
27 | return (TdApi.PrivateChatInfo) getChat().type;
28 | }
29 |
30 | public void onEventMainThread(TdApi.UpdateFile file) {
31 | if (!TdFileHelper.sameId(getPrivateChatInfo().user.photoSmall, file.fileId))
32 | return;
33 |
34 | getPrivateChatInfo().user.photoSmall = new TdApi.FileLocal(file.fileId, file.size, file.path);
35 | if (getAssignedViewHolder() != null) {
36 | TdApi.User user = getPrivateChatInfo().user;
37 | setChatAvatar(file.path, user.firstName + " " + user.lastName, getAssignedViewHolder());
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/Country.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models;
2 |
3 | public class Country {
4 | private String name;
5 | private String code;
6 |
7 | public Country(String name, String code){
8 | this.name = name;
9 | this.code = code;
10 | }
11 |
12 | public String getName() {
13 | return name;
14 | }
15 |
16 | public void setName(String name) {
17 | this.name = name;
18 | }
19 |
20 | public String getCode() {
21 | return code;
22 | }
23 |
24 | public void setCode(String code) {
25 | this.code = code;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/MessageTestModel.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models;
2 |
3 |
4 | import java.text.SimpleDateFormat;
5 | import java.util.Calendar;
6 |
7 | public class MessageTestModel {
8 | private int id;
9 | private String image;
10 | private Boolean isGroupChat;
11 | private String user_name;
12 | private Boolean isRead;
13 | private String time;
14 | private Boolean isRecentlyOnline;
15 | private String last_message;
16 | private int number_of_unread_messages;
17 | private String music_path;
18 |
19 | public MessageTestModel(int id, Boolean isGroupChat, String user_name, Boolean isRead, Boolean isRecentlyOnline,
20 | String last_message, int number_of_unread_messages, String music_path){
21 | this.id = id;
22 | this.isGroupChat = isGroupChat;
23 | this.user_name = user_name;
24 | this.isRead = isRead;
25 | this.isRecentlyOnline = isRecentlyOnline;
26 | this.last_message = last_message;
27 | this.number_of_unread_messages = number_of_unread_messages;
28 | this.time = new SimpleDateFormat("HH:mm a").format(Calendar.getInstance().getTime());
29 | this.music_path = music_path;
30 | }
31 |
32 | public String getImage() {
33 | return image;
34 | }
35 |
36 | public void setImage(String image) {
37 | this.image = image;
38 | }
39 |
40 | public Boolean getIsGroupChat() {
41 | return isGroupChat;
42 | }
43 |
44 | public void setIsGroupChat(Boolean isGroupChat) {
45 | this.isGroupChat = isGroupChat;
46 | }
47 |
48 | public String getUser_name() {
49 | return user_name;
50 | }
51 |
52 | public void setUser_name(String user_name) {
53 | this.user_name = user_name;
54 | }
55 |
56 | public Boolean getIsRead() {
57 | return isRead;
58 | }
59 |
60 | public void setIsRead(Boolean isRead) {
61 | this.isRead = isRead;
62 | }
63 |
64 | public String getTime() {
65 | return time;
66 | }
67 |
68 | public void setTime(String time) {
69 | this.time = time;
70 | }
71 |
72 | public Boolean getIsRecentlyOnline() {
73 | return isRecentlyOnline;
74 | }
75 |
76 | public void setIsRecentlyOnline(Boolean isRecentlyOnline) {
77 | this.isRecentlyOnline = isRecentlyOnline;
78 | }
79 |
80 | public String getLast_message() {
81 | return last_message;
82 | }
83 |
84 | public void setLast_message(String last_message) {
85 | this.last_message = last_message;
86 | }
87 |
88 | public int getNumber_of_unread_messages() {
89 | return number_of_unread_messages;
90 | }
91 |
92 | public void setNumber_of_unread_messages(Integer number_of_unread_messages) {
93 | this.number_of_unread_messages = number_of_unread_messages;
94 | }
95 |
96 | public int getId() {
97 | return id;
98 | }
99 |
100 | public void setId(int id) {
101 | this.id = id;
102 | }
103 |
104 | @Override
105 | public int hashCode() {
106 | return id;
107 | }
108 |
109 | @Override
110 | public boolean equals(Object o) {
111 | return (((MessageTestModel)o).getId() == this.getId());
112 | }
113 |
114 | public String getMusic_path() {
115 | return music_path;
116 | }
117 |
118 | public void setMusic_path(String music_path) {
119 | this.music_path = music_path;
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/Messages/AddParticipantNotification.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models.Messages;
2 |
3 | import org.drinkless.td.libcore.telegram.TdApi;
4 |
5 | public class AddParticipantNotification extends ChatEvent {
6 |
7 | private final TdApi.User who;
8 | private final TdApi.User whom;
9 |
10 | public AddParticipantNotification(TdApi.User who, TdApi.User whom) {
11 |
12 | this.who = who;
13 | this.whom = whom;
14 | }
15 |
16 | public TdApi.User getWhom() {
17 | return whom;
18 | }
19 |
20 | public TdApi.User getWho() {
21 | return who;
22 | }
23 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/Messages/ChatEvent.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models.Messages;
2 |
3 | import com.katy.telegram.TelegramApplication;
4 |
5 | public abstract class ChatEvent {
6 |
7 | /*
8 | * fake subscription, needed for ChatEventFactory to be able to register all it's children to EventBus
9 | * */
10 | public void onEvent(TelegramApplication application){
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/Messages/ChatEventFactory.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models.Messages;
2 |
3 | import org.drinkless.td.libcore.telegram.TdApi;
4 |
5 | import de.greenrobot.event.EventBus;
6 |
7 | public class ChatEventFactory {
8 |
9 | /**
10 | * Creates ChatEvent from tdapi.message
11 | */
12 | public static ChatEvent create(TdApi.Chat chat, TdApi.Message message, TdApi.User from) {
13 | ChatEvent event = null;
14 | if (message.message instanceof TdApi.MessageText) {
15 | event = new TextChatMessage(chat, message, from);
16 | } else if (message.message instanceof TdApi.MessageSticker) {
17 | event = new StickerChatMessage(chat, message, from);
18 | } else if (message.message instanceof TdApi.MessagePhoto) {
19 | event = new PhotoChatMessage(chat, message, from);
20 | } else if (message.message instanceof TdApi.MessageAudio) {
21 | event = new AudioChatMessage(chat, message, from);
22 | } else if (message.message instanceof TdApi.MessageVideo) {
23 | event = new VideoChatMessage(chat, message, from);
24 | } else if (message.message instanceof TdApi.MessageChatChangePhoto) {
25 | event = new GroupPhotoChangedNotification(chat, from);
26 | } else if (message.message instanceof TdApi.MessageGeoPoint) {
27 | event = new GeoPointChatMessage(chat, message, from);
28 | } else if (message.message instanceof TdApi.MessageDocument) {
29 | String[] documentType = ((TdApi.MessageDocument) message.message).document.mimeType.split("/");
30 | if (documentType[0].equals("audio")) {
31 | event = new AudioChatMessage(chat, message, from);
32 | } else if (documentType[0].equals("video")) {
33 | event = new VideoChatMessage(chat, message, from);
34 | } else {
35 | event = new DocumentChatMessage(chat, message, from);
36 | }
37 | }
38 |
39 | if (event == null) {
40 | event = new NotImplementedYetChatMessage(chat, message, from);
41 | }
42 |
43 | EventBus.getDefault().register(event);
44 | return event;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/Messages/GeoPointChatMessage.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models.Messages;
2 |
3 | import android.content.Intent;
4 | import android.net.Uri;
5 | import android.view.View;
6 | import android.widget.FrameLayout;
7 |
8 | import com.katy.telegram.Activities.BaseActivity;
9 | import com.katy.telegram.Adapters.ChatAdapter;
10 |
11 | import org.drinkless.td.libcore.telegram.TdApi;
12 |
13 | import java.util.Locale;
14 |
15 | public class GeoPointChatMessage extends ChatMessage {
16 |
17 | public GeoPointChatMessage(TdApi.Chat chat, TdApi.Message message, TdApi.User from) {
18 | super(chat, message, from);
19 | }
20 |
21 | public TdApi.MessageGeoPoint getMessageGeoPoint() {
22 | return (TdApi.MessageGeoPoint) getMessage().message;
23 | }
24 |
25 | @Override
26 | public void onViewAttached(ChatAdapter.ChatMessageViewHolder holder) {
27 | super.onViewAttached(holder);
28 |
29 | FrameLayout relativeLayout = getAssignedViewHolder().getMessageFrameLayout();
30 | if (relativeLayout != null) {
31 | relativeLayout.setOnClickListener(new View.OnClickListener() {
32 | @Override
33 | public void onClick(View v) {
34 | String uri = String.format(Locale.ENGLISH, "http://maps.google.com/maps?q=loc:%f,%f", getMessageGeoPoint().geoPoint.latitude, getMessageGeoPoint().geoPoint.longitude);
35 | Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
36 | intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
37 | BaseActivity.getCurrentActivity().startActivity(intent);
38 | }
39 | });
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/Messages/GroupCreatedNotification.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models.Messages;
2 |
3 | public class GroupCreatedNotification extends ChatEvent {
4 |
5 | private int fromId;
6 | private String groupChatName;
7 |
8 | public GroupCreatedNotification(int fromId, String groupChatName) {
9 | this.fromId = fromId;
10 | this.groupChatName = groupChatName;
11 | }
12 |
13 | public int getFromId() {
14 | return fromId;
15 | }
16 |
17 | public String getGroupChatName() {
18 | return groupChatName;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/Messages/GroupPhotoChangedNotification.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models.Messages;
2 |
3 | import org.drinkless.td.libcore.telegram.TdApi;
4 |
5 | public class GroupPhotoChangedNotification extends ChatEvent {
6 |
7 | private TdApi.Chat chat;
8 | private final TdApi.User who;
9 |
10 | public GroupPhotoChangedNotification(TdApi.Chat chat, TdApi.User who) {
11 | this.chat = chat;
12 | this.who = who;
13 | }
14 |
15 | public TdApi.User getWho() {
16 | return who;
17 | }
18 |
19 | public TdApi.Chat getChat() {
20 | return chat;
21 | }
22 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/Messages/NewDaySeparatorNotification.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models.Messages;
2 |
3 | import java.util.Date;
4 |
5 | public class NewDaySeparatorNotification extends ChatEvent {
6 | private Date date;
7 |
8 | public NewDaySeparatorNotification(Date date) {
9 |
10 | this.date = date;
11 | }
12 |
13 | public Date getDate() {
14 | return date;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/Messages/NotImplementedYetChatMessage.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models.Messages;
2 |
3 | import org.drinkless.td.libcore.telegram.TdApi;
4 |
5 | /**
6 | * Created by Katy on 5/15/2015.
7 | */
8 | public class NotImplementedYetChatMessage extends ChatMessage {
9 | public NotImplementedYetChatMessage(TdApi.Chat chat, TdApi.Message message, TdApi.User from) {
10 | super(chat, message, from);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/Messages/StickerChatMessage.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models.Messages;
2 |
3 |
4 | import android.graphics.BitmapFactory;
5 | import android.widget.FrameLayout;
6 | import android.widget.ImageView;
7 |
8 | import com.katy.telegram.Adapters.ChatAdapter;
9 | import com.katy.telegram.R;
10 | import com.katy.telegram.Utils.TdFileHelper;
11 |
12 | import org.drinkless.td.libcore.telegram.TdApi;
13 |
14 | public class StickerChatMessage extends ChatMessage {
15 |
16 | private int fileId;
17 | private String filePath;
18 | private boolean initialized;
19 |
20 | public StickerChatMessage(TdApi.Chat chat, TdApi.Message message, TdApi.User from) {
21 | super(chat, message, from);
22 | }
23 |
24 | public TdApi.MessageSticker getMessageSticker() {
25 | return (TdApi.MessageSticker) getMessage().message;
26 | }
27 |
28 | public void startDownloadSticker() {
29 | TdApi.Sticker sticker = getMessageSticker().sticker;
30 | fileId = (int) TdFileHelper.getFileId(sticker.sticker);
31 | if (sticker.sticker instanceof TdApi.FileEmpty) {
32 | TdFileHelper.getInstance().getFile(sticker.sticker, true);
33 | } else {
34 | filePath = ((TdApi.FileLocal) sticker.sticker).path;
35 | }
36 | }
37 |
38 | @Override
39 | public void onViewAttached(ChatAdapter.ChatMessageViewHolder holder) {
40 | super.onViewAttached(holder);
41 | if (initialized)
42 | return;
43 | initialized = true;
44 |
45 | filePath = TdFileHelper.getInstance().getFile(getMessageSticker().sticker.sticker, false);
46 | if (filePath == null) {
47 | startDownloadSticker();
48 | }
49 | }
50 |
51 | public void onEventMainThread(final TdApi.UpdateFile file) {
52 | if (file.fileId == fileId) {
53 | filePath = file.path;
54 | if (getAssignedViewHolder() != null) {
55 | FrameLayout relativeLayout = getAssignedViewHolder().getMessageFrameLayout();
56 |
57 | ImageView sticker = (ImageView) relativeLayout.findViewById(R.id.sticker);
58 | if (sticker != null) {
59 | sticker.setImageBitmap(BitmapFactory.decodeFile(filePath));
60 | }
61 | }
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/Messages/TextChatMessage.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models.Messages;
2 |
3 | import org.drinkless.td.libcore.telegram.TdApi;
4 |
5 | public class TextChatMessage extends ChatMessage{
6 |
7 | public TextChatMessage(TdApi.Chat chat, TdApi.Message message, TdApi.User from) {
8 | super(chat, message, from);
9 | }
10 |
11 | public TdApi.MessageText getMessageText() {
12 | return (TdApi.MessageText)getMessage().message;
13 | }
14 | }
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Models/Messages/UnreadMessagesBadge.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Models.Messages;
2 |
3 | public class UnreadMessagesBadge extends ChatEvent {
4 | private int unreadCount;
5 |
6 | public UnreadMessagesBadge(int unreadCount) {
7 |
8 | this.unreadCount = unreadCount;
9 | }
10 |
11 | public int getUnreadCount() {
12 | return unreadCount;
13 | }
14 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/TelegramApplication.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram;
2 |
3 | import android.app.Application;
4 |
5 | import org.drinkless.td.libcore.telegram.Client;
6 | import org.drinkless.td.libcore.telegram.TG;
7 | import org.drinkless.td.libcore.telegram.TdApi;
8 |
9 | import de.greenrobot.event.EventBus;
10 |
11 | public class TelegramApplication extends Application {
12 |
13 | @Override
14 | public void onCreate() {
15 | super.onCreate();
16 | TG.setDir(getFilesDir().toString());
17 | TG.setUpdatesHandler(new TestHandler());
18 | }
19 |
20 | private class TestHandler implements Client.ResultHandler {
21 | @Override
22 | public void onResult(TdApi.TLObject object) {
23 | final TdApi.TLObject tlObject = object;
24 |
25 | EventBus.getDefault().post(tlObject);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Utils/AvatarHelper.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Utils;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.BitmapFactory;
6 | import android.graphics.Color;
7 | import android.view.View;
8 | import android.widget.TextView;
9 |
10 | import com.katy.telegram.R;
11 |
12 | public class AvatarHelper {
13 |
14 | public static RoundImage createRoundImage(Context context, String image, String user_name) {
15 | Bitmap bm = Bitmap.createBitmap(50, 50, Bitmap.Config.ARGB_8888);
16 | if (image != null && !image.equals("")) {
17 | bm = BitmapFactory.decodeFile(image);
18 | } else {
19 | String[] avatarColors = context.getResources().getStringArray(R.array.avatar_colors);
20 | String contactColor = avatarColors[Math.abs(user_name.hashCode() % (avatarColors.length - 1))];
21 | bm.eraseColor(Color.parseColor(contactColor));
22 | }
23 | return new RoundImage(bm);
24 | }
25 |
26 | public static void createImageShortName(boolean visibility, String user_name, TextView short_name) {
27 | if (visibility) {
28 | short_name.setVisibility(View.VISIBLE);
29 | String[] userName = user_name.toUpperCase().split(" ");
30 | short_name.setText(userName[0].substring(0, 1));
31 | if (userName.length > 1) {
32 | short_name.setText(short_name.getText() + userName[1].substring(0, 1));
33 | }
34 | } else {
35 | short_name.setVisibility(View.GONE);
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Utils/CenteredImageSpan.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Utils;
2 |
3 | import android.graphics.Canvas;
4 | import android.graphics.Paint;
5 | import android.graphics.drawable.Drawable;
6 | import android.text.style.ReplacementSpan;
7 |
8 | public class CenteredImageSpan extends ReplacementSpan {
9 | private final Drawable drawable;
10 |
11 | public CenteredImageSpan(final Drawable drawable) {
12 | this.drawable = drawable;
13 | drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
14 | }
15 |
16 | @Override
17 | public int getSize(final Paint paint, final CharSequence text, final int start, final int end, final Paint.FontMetricsInt fm) {
18 | return drawable.getIntrinsicWidth();
19 | }
20 |
21 | @Override
22 | public void draw(final Canvas canvas, final CharSequence text, final int start, final int end, final float x, final int top, final int y, final int bottom, final Paint paint) {
23 | final Paint.FontMetrics metrics = paint.getFontMetrics();
24 | final float padding = (metrics.descent - metrics.ascent - drawable.getIntrinsicHeight()) / 2f;
25 | final float transY = bottom - drawable.getIntrinsicHeight() - padding;
26 | canvas.save();
27 | canvas.translate(x, transY);
28 | drawable.draw(canvas);
29 | canvas.restore();
30 | }
31 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Utils/FileSaveOrCopyHelper.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Utils;
2 |
3 | import android.os.Environment;
4 | import android.widget.Toast;
5 |
6 | import com.katy.telegram.Activities.BaseActivity;
7 |
8 | import java.io.File;
9 | import java.io.FileInputStream;
10 | import java.io.FileOutputStream;
11 | import java.io.IOException;
12 | import java.io.InputStream;
13 | import java.io.OutputStream;
14 |
15 | public class FileSaveOrCopyHelper {
16 |
17 | public static String copyFile(File src) throws IOException {
18 | // if (new File(filePath.replace(src.getName(), "")).exists()) {
19 | // filePath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Kelegram/Video/" + src.getName();
20 | // return;
21 | // }
22 |
23 | File dst = new File(Environment.getExternalStorageDirectory() + "/Kelegram/Video/");
24 | if (!dst.exists()) {
25 | boolean mkdir = dst.mkdirs();
26 | if (!mkdir) {
27 | Toast.makeText(BaseActivity.getCurrentActivity(), "Can't create folder :(", Toast.LENGTH_SHORT).show();
28 | }
29 | }
30 |
31 | InputStream is = new FileInputStream(src);
32 | String path = dst.getPath() + "/" + src.getName();
33 | OutputStream os = new FileOutputStream(new File(path));
34 | byte[] buff = new byte[1024];
35 | int len;
36 | while ((len = is.read(buff)) > 0) {
37 | os.write(buff, 0, len);
38 | }
39 | is.close();
40 | os.close();
41 |
42 | return path;
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Utils/FileSizeUnitsHelper.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Utils;
2 |
3 | import java.text.DecimalFormat;
4 |
5 | public class FileSizeUnitsHelper {
6 | public static String readableFileSize(long size) {
7 | if (size <= 0) return "0";
8 | final String[] units = new String[]{"B", "kB", "MB", "GB", "TB"};
9 | int digitGroups = (int) (Math.log10(size) / Math.log10(1024));
10 | return new DecimalFormat("#,##0.#").format(size / Math.pow(1024, digitGroups)) + " " + units[digitGroups];
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Utils/ImageHelper.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Utils;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.os.Environment;
6 |
7 | import java.io.File;
8 | import java.io.FileInputStream;
9 | import java.io.FileOutputStream;
10 | import java.io.InputStream;
11 | import java.io.OutputStream;
12 | import java.util.Random;
13 |
14 | public class ImageHelper {
15 | public static File saveBitmap(Bitmap bmp) {
16 | String extStorageDirectory = Environment.getExternalStorageDirectory().toString();
17 | OutputStream outStream = null;
18 | Random random = new Random(Byte.MAX_VALUE);
19 | String imageName = String.format("%d.png", (int) (random.nextInt() + Byte.MAX_VALUE / 2.0));
20 | File file = new File(extStorageDirectory, imageName);
21 | if (file.exists()) {
22 | file.delete();
23 | file = new File(extStorageDirectory, imageName);
24 | }
25 | try {
26 | outStream = new FileOutputStream(file);
27 | bmp.compress(Bitmap.CompressFormat.PNG, 100, outStream);
28 | outStream.flush();
29 | outStream.close();
30 |
31 | } catch (Exception e) {
32 | e.printStackTrace();
33 | return null;
34 | }
35 | return file;
36 | }
37 | //
38 | // public static void galleryAddPic(String imagePath, Context context) {
39 | // File externalStorageKelegram = new File(Environment.getExternalStoragePublicDirectory(
40 | // Environment.DIRECTORY_PICTURES) + "/Kelegram/");
41 | // if (!externalStorageKelegram.exists()) {
42 | // externalStorageKelegram.mkdirs();
43 | // }
44 | //
45 | // try {
46 | // InputStream in = new FileInputStream(imagePath);
47 | // OutputStream out = new FileOutputStream(externalStorageKelegram.getPath() + imagePath);
48 | //
49 | // // Copy the bits from instream to outstream
50 | // byte[] buf = new byte[1024];
51 | // int len;
52 | //
53 | // while ((len = in.read(buf)) > 0) {
54 | // out.write(buf, 0, len);
55 | // }
56 | //
57 | // in.close();
58 | // out.close();
59 | // } catch (Exception e) {
60 | // e.printStackTrace();
61 | // }
62 | // }
63 | }
64 |
65 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Utils/PhotoGalleryService.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Utils;
2 |
3 | import android.app.Activity;
4 | import android.content.ClipData;
5 | import android.content.Intent;
6 | import android.graphics.Bitmap;
7 | import android.graphics.BitmapFactory;
8 | import android.net.Uri;
9 | import android.os.Build;
10 | import android.provider.MediaStore;
11 | import android.support.annotation.NonNull;
12 |
13 | import java.io.IOException;
14 | import java.io.InputStream;
15 | import java.util.ArrayList;
16 | import java.util.List;
17 |
18 | public class PhotoGalleryService {
19 |
20 | private Activity activity;
21 | private PhotoChosenListener listener;
22 | static final int REQUEST_CAMERA = 200;
23 | static final int SELECT_FILE = 201;
24 |
25 | public PhotoGalleryService(Activity activity) {
26 | this.activity = activity;
27 | }
28 |
29 | public void choose(boolean fromCamera, @NonNull PhotoChosenListener listener) {
30 | this.listener = listener;
31 |
32 | if (fromCamera) {
33 | Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
34 | activity.startActivityForResult(intent, REQUEST_CAMERA);
35 | } else {
36 | Intent intent = new Intent(
37 | Intent.ACTION_PICK,
38 | android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
39 | intent.setType("image/*");
40 | intent.setAction(Intent.ACTION_GET_CONTENT);
41 | if (Build.VERSION.SDK_INT >= 18) {
42 | intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
43 | }
44 | activity.startActivityForResult(Intent.createChooser(intent, "Select File"), SELECT_FILE);
45 | }
46 | }
47 |
48 | public List handleActivityResult(int requestCode, int resultCode, Intent data) {
49 | List selectedImagesPaths = new ArrayList<>();
50 |
51 | BitmapProcessor bitmapProcessor = listener.onChosen();
52 | if (bitmapProcessor == null) {
53 | throw new IllegalArgumentException("BitmapProcessor is null");
54 | }
55 |
56 | if (resultCode == Activity.RESULT_OK) {
57 | if (requestCode == REQUEST_CAMERA) {
58 | Bitmap bitmap = (Bitmap) data.getExtras().get("data");
59 | Uri uri = Uri.fromFile(ImageHelper.saveBitmap(bitmap));
60 | selectedImagesPaths.add(uri);
61 |
62 | } else if (requestCode == SELECT_FILE) {
63 | if (Build.VERSION.SDK_INT >= 18 && null == data.getData()) {
64 | ClipData clipdata = data.getClipData();
65 | for (int i = 0; i < clipdata.getItemCount(); i++) {
66 | try {
67 | Bitmap bitmap = MediaStore.Images.Media.getBitmap(activity.getContentResolver(), clipdata.getItemAt(i).getUri());
68 | Uri uri = Uri.fromFile(ImageHelper.saveBitmap(bitmap));
69 | selectedImagesPaths.add(uri);
70 | } catch (IOException e) {
71 | e.printStackTrace();
72 | }
73 | }
74 | } else {
75 | InputStream inputStream = null;
76 | try {
77 | inputStream = activity.getContentResolver().openInputStream(data.getData());
78 | Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
79 | Uri uri = Uri.fromFile(ImageHelper.saveBitmap(bitmap));
80 | selectedImagesPaths.add(uri);
81 | } catch (IOException e) {
82 | e.printStackTrace();
83 | }
84 | }
85 | }
86 | } else {
87 | listener.onCancel();
88 | }
89 | return selectedImagesPaths;
90 | }
91 |
92 | public interface PhotoChosenListener {
93 | void onCancel();
94 |
95 | BitmapProcessor onChosen();
96 | }
97 |
98 | public interface BitmapProcessor {
99 | void Process(Bitmap bmp, boolean isLast);
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Utils/RecyclerItemClickListener.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Utils;
2 |
3 | import android.content.Context;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.GestureDetector;
6 | import android.view.MotionEvent;
7 | import android.view.View;
8 |
9 | public class RecyclerItemClickListener implements RecyclerView.OnItemTouchListener {
10 | public static interface OnItemClickListener {
11 | public void onItemClick(View view, int position);
12 |
13 | public void onItemLongClick(View view, int position);
14 | }
15 |
16 | private OnItemClickListener mListener;
17 | private GestureDetector mGestureDetector;
18 |
19 | public RecyclerItemClickListener(Context context, final RecyclerView recyclerView, OnItemClickListener listener) {
20 | mListener = listener;
21 |
22 | mGestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() {
23 | @Override
24 | public boolean onSingleTapUp(MotionEvent e) {
25 | return true;
26 | }
27 |
28 | @Override
29 | public void onLongPress(MotionEvent e) {
30 | View childView = recyclerView.findChildViewUnder(e.getX(), e.getY());
31 |
32 | if (childView != null && mListener != null) {
33 | mListener.onItemLongClick(childView, recyclerView.getChildPosition(childView));
34 | }
35 | }
36 | });
37 | }
38 |
39 | @Override
40 | public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent e) {
41 | View childView = view.findChildViewUnder(e.getX(), e.getY());
42 |
43 | if (childView != null && mListener != null && mGestureDetector.onTouchEvent(e)) {
44 | mListener.onItemClick(childView, view.getChildPosition(childView));
45 | }
46 |
47 | return false;
48 | }
49 |
50 | @Override
51 | public void onTouchEvent(RecyclerView view, MotionEvent motionEvent) {
52 | }
53 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Utils/RoundImage.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Utils;
2 |
3 | import android.graphics.Bitmap;
4 | import android.graphics.BitmapShader;
5 | import android.graphics.Canvas;
6 | import android.graphics.ColorFilter;
7 | import android.graphics.Paint;
8 | import android.graphics.PixelFormat;
9 | import android.graphics.Rect;
10 | import android.graphics.RectF;
11 | import android.graphics.Shader;
12 | import android.graphics.drawable.Drawable;
13 |
14 | public class RoundImage extends Drawable {
15 | private final Bitmap mBitmap;
16 | private final Paint mPaint;
17 | private final RectF mRectF;
18 | private final int mBitmapWidth;
19 | private final int mBitmapHeight;
20 |
21 | public RoundImage(Bitmap bitmap) {
22 | mBitmap = bitmap;
23 | mRectF = new RectF();
24 | mPaint = new Paint();
25 | mPaint.setAntiAlias(true);
26 | mPaint.setDither(true);
27 | final BitmapShader shader = new BitmapShader(bitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
28 | mPaint.setShader(shader);
29 |
30 | mBitmapWidth = mBitmap.getWidth();
31 | mBitmapHeight = mBitmap.getHeight();
32 | }
33 |
34 | @Override
35 | public void draw(Canvas canvas) {
36 | canvas.drawOval(mRectF, mPaint);
37 | }
38 |
39 | @Override
40 | protected void onBoundsChange(Rect bounds) {
41 | super.onBoundsChange(bounds);
42 | mRectF.set(bounds);
43 | }
44 |
45 | @Override
46 | public void setAlpha(int alpha) {
47 | if (mPaint.getAlpha() != alpha) {
48 | mPaint.setAlpha(alpha);
49 | invalidateSelf();
50 | }
51 | }
52 |
53 | @Override
54 | public void setColorFilter(ColorFilter cf) {
55 | mPaint.setColorFilter(cf);
56 | }
57 |
58 | @Override
59 | public int getOpacity() {
60 | return PixelFormat.TRANSLUCENT;
61 | }
62 |
63 | @Override
64 | public int getIntrinsicWidth() {
65 | return mBitmapWidth;
66 | }
67 |
68 | @Override
69 | public int getIntrinsicHeight() {
70 | return mBitmapHeight;
71 | }
72 |
73 | public void setAntiAlias(boolean aa) {
74 | mPaint.setAntiAlias(aa);
75 | invalidateSelf();
76 | }
77 |
78 | @Override
79 | public void setFilterBitmap(boolean filter) {
80 | mPaint.setFilterBitmap(filter);
81 | invalidateSelf();
82 | }
83 |
84 | @Override
85 | public void setDither(boolean dither) {
86 | mPaint.setDither(dither);
87 | invalidateSelf();
88 | }
89 |
90 | public Bitmap getBitmap() {
91 | return mBitmap;
92 | }
93 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Utils/TdFileHelper.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Utils;
2 |
3 | import com.katy.telegram.Managers.TgClient;
4 |
5 | import org.drinkless.td.libcore.telegram.TdApi;
6 |
7 | import java.io.File;
8 | import java.util.HashMap;
9 |
10 | import de.greenrobot.event.EventBus;
11 |
12 | public class TdFileHelper {
13 |
14 | private HashMap filePathMap = new HashMap<>();
15 |
16 | private static TdFileHelper instance;
17 |
18 | public static TdFileHelper getInstance() {
19 | if (instance == null) {
20 | synchronized (TdFileHelper.class) {
21 | if (instance == null) {
22 | instance = new TdFileHelper();
23 | EventBus.getDefault().register(instance);
24 | }
25 | }
26 | }
27 | return instance;
28 | }
29 |
30 | private TdFileHelper() {
31 | }
32 |
33 | /*
34 | * gets file from cache or downloads it if downloadIfNotExist is set to true
35 | * */
36 | public String getFile(TdApi.File file, boolean downloadIfNotExist) {
37 | return getFile(file, downloadIfNotExist, true);
38 | }
39 |
40 | /*
41 | * gets file from cache or downloads it if downloadIfNotExist is set to true
42 | * */
43 | public String getFile(TdApi.File file, boolean downloadIfNotExist, boolean postUpdateEvenIfInCache) {
44 | if (file instanceof TdApi.FileLocal){
45 | TdApi.FileLocal fileLocal = (TdApi.FileLocal) file;
46 | if (postUpdateEvenIfInCache)
47 | EventBus.getDefault().post(new TdApi.UpdateFile(fileLocal.id, fileLocal.size, fileLocal.path));
48 | return fileLocal.path;
49 | }
50 |
51 | TdApi.FileEmpty fileEmpty = (TdApi.FileEmpty) file;
52 |
53 | String filePath;
54 | synchronized (instance) {
55 | filePath = filePathMap.get(fileEmpty.id);
56 | }
57 |
58 | if (filePath != null) {
59 | if (postUpdateEvenIfInCache)
60 | EventBus.getDefault().post(new TdApi.UpdateFile(fileEmpty.id, fileEmpty.size, filePath));
61 | return filePath;
62 | }
63 | if (downloadIfNotExist) {
64 | TdApi.DownloadFile downloadFile = new TdApi.DownloadFile(fileEmpty.id);
65 | TgClient.send(downloadFile);
66 | }
67 | return null;
68 | }
69 |
70 | public void onEvent(TdApi.UpdateFile file) {
71 | synchronized (instance) {
72 | filePathMap.put(file.fileId, file.path);
73 | }
74 | }
75 |
76 | public static boolean sameId(TdApi.File file, long fileId) {
77 | return getFileId(file) == fileId;
78 | }
79 |
80 | public static long getFileId(TdApi.File file) {
81 | if (file instanceof TdApi.FileEmpty) {
82 | return ((TdApi.FileEmpty) file).id;
83 | }
84 | return ((TdApi.FileLocal) file).id;
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/app/src/main/java/com/katy/telegram/Utils/URLSpanNoUnderline.java:
--------------------------------------------------------------------------------
1 | package com.katy.telegram.Utils;
2 |
3 | import android.text.Spannable;
4 | import android.text.TextPaint;
5 | import android.text.style.URLSpan;
6 |
7 | public class URLSpanNoUnderline extends URLSpan {
8 | public URLSpanNoUnderline(String p_Url) {
9 | super(p_Url);
10 | }
11 |
12 | public void updateDrawState(TextPaint p_DrawState) {
13 | super.updateDrawState(p_DrawState);
14 | p_DrawState.setUnderlineText(false);
15 | }
16 |
17 |
18 | /**
19 | * Removes URL underlines in a string by replacing URLSpan occurrences by
20 | * URLSpanNoUnderline objects.
21 | *
22 | * @param p_Text A Spannable object. For example, a TextView casted as
23 | * Spannable.
24 | */
25 | public static void removeUnderlines(Spannable p_Text) {
26 | URLSpan[] spans = p_Text.getSpans(0, p_Text.length(), URLSpan.class);
27 |
28 | for (URLSpan span : spans) {
29 | int start = p_Text.getSpanStart(span);
30 | int end = p_Text.getSpanEnd(span);
31 | p_Text.removeSpan(span);
32 | span = new URLSpanNoUnderline(span.getURL());
33 | p_Text.setSpan(span, start, end, 0);
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/java/org/drinkless/td/libcore/telegram/NativeClient.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of TD.
3 | *
4 | * TD is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * TD is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with TD. If not, see .
16 | *
17 | * Copyright 2014-2015 Arseny Smirnov
18 | * 2014-2015 Aliaksei Levin
19 | */
20 |
21 | package org.drinkless.td.libcore.telegram;
22 |
23 | import android.util.Log;
24 |
25 | /**
26 | * This class is used internally by Client to send requests to TDLib.
27 | */
28 | final class NativeClient {
29 | static {
30 | // TODO: move System.loadLibrary("tdjni") in proper place.
31 | try {
32 | System.loadLibrary("tdjni");
33 | } catch (UnsatisfiedLinkError e) {
34 | Log.w("DLTD", "Can't find tdjni", e);
35 | }
36 | }
37 |
38 | public static native long createClient();
39 |
40 | public static native void destroyClient(long clientId);
41 |
42 | public static native void clientInit(long clientId, String dir);
43 |
44 | public static native int clientRun(long clientId, long[] eventIds, TdApi.TLObject[] events, int changesCount, double timeout);
45 |
46 | public static native void clientWakeUp(long clientId);
47 |
48 | public static native void clientClear(long clientId);
49 |
50 | //Just for testing
51 | public static native TdApi.TLObject pingPong(TdApi.TLObject object);
52 |
53 | public static native void ping(TdApi.TLObject object);
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/java/org/drinkless/td/libcore/telegram/TG.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of TD.
3 | *
4 | * TD is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU Lesser General Public License as published by
6 | * the Free Software Foundation, either version 2 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * TD is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU Lesser General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public License
15 | * along with TD. If not, see .
16 | *
17 | * Copyright 2014-2015 Arseny Smirnov
18 | * 2014-2015 Aliaksei Levin
19 | */
20 |
21 | package org.drinkless.td.libcore.telegram;
22 |
23 | /**
24 | * This class is used for managing singleton-instance of class Client.
25 | */
26 | public final class TG {
27 | private static volatile Client.ResultHandler updatesHandler;
28 | private static volatile Client instance;
29 | private static volatile String dir;
30 |
31 | /**
32 | * Sets handler which will be invoked for every incoming update from TDLib of type TdApi.Update.
33 | * Must be called before getClientInstance().
34 | *
35 | * @param updatesHandler Handler to be invoked on updates.
36 | */
37 | public static void setUpdatesHandler(Client.ResultHandler updatesHandler) {
38 | synchronized (TG.class) {
39 | TG.updatesHandler = updatesHandler;
40 | if (instance != null) {
41 | instance.setUpdatesHandler(TG.updatesHandler);
42 | }
43 | }
44 | }
45 |
46 | /**
47 | * Sets directory for storing persistent data of TDLib.
48 | * Must be called before getClientInstance().
49 | *
50 | * @param dir Directory to store persistent data.
51 | */
52 | public static void setDir(String dir) {
53 | synchronized (TG.class) {
54 | TG.dir = dir;
55 | }
56 | }
57 |
58 | /**
59 | * This function stops and destroys Client.
60 | * No queries are possible after this call, but completely new instance
61 | * of a Client with different settings can be obtained through getClientInstance()
62 | */
63 | public static void stopClient() {
64 | if (instance != null) {
65 | synchronized (TG.class) {
66 | if (instance != null) {
67 | Client local = instance;
68 | instance = null;
69 | updatesHandler = null;
70 | local.stop();
71 | }
72 | }
73 | }
74 | }
75 |
76 | /**
77 | * This function returns singleton object of class Client which can be used for querying TDLib.
78 | * setUpdatesHandler() and setDir() must be called before this function.
79 | */
80 | public static Client getClientInstance() {
81 | if (instance == null) {
82 | synchronized (TG.class) {
83 | if (instance == null) {
84 | if (dir == null) {
85 | return null;
86 | }
87 | Client local = Client.create(updatesHandler, dir);
88 | new Thread(local).start();
89 | instance = local;
90 | }
91 | }
92 | }
93 | return instance;
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/app/src/main/jniLibs/armeabi-v7a/libtdjni.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/jniLibs/armeabi-v7a/libtdjni.so
--------------------------------------------------------------------------------
/app/src/main/jniLibs/x86/libtdjni.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/jniLibs/x86/libtdjni.so
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_in_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/slide_in_up.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/drawer_shadow.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/drawer_shadow.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_arrow_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_arrow_down.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_attach.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_attach.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_attach_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_attach_check.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_attach_gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_attach_gallery.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_attach_photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_attach_photo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_back.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_back_photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_back_photo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_badge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_badge.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_check.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_clock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_clock.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_download.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_download_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_download_blue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_drawer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_error.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_file.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_group.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_logout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_logout.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_map_pin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_map_pin.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_menu.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_more.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_more_photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_more_photo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_msg_panel_kb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_msg_panel_kb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_mute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_mute.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_mute_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_mute_blue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_pause.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_pause_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_pause_blue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_play.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_scroll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_scroll.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_send.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_small_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_small_arrow.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_backspace.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_backspace.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_backspace_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_backspace_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_bell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_bell.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_bell_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_bell_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_car.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_car.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_car_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_car_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_flower.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_flower.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_flower_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_flower_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_grid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_grid.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_grid_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_grid_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_recent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_recent.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_recent_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_recent_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_smile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_smile.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_smile_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_smile_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_sticker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_sticker.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_smiles_sticker_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/ic_smiles_sticker_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/test.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-hdpi/test.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/drawer_shadow.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/drawer_shadow.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_arrow_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_arrow_down.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_attach.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_attach.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_attach_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_attach_check.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_attach_gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_attach_gallery.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_attach_photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_attach_photo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_back.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_back_photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_back_photo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_badge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_badge.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_check.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_clock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_clock.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_download.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_download_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_download_blue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_drawer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_error.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_file.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_group.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_logout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_logout.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_map_pin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_map_pin.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_menu.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_more.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_more_photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_more_photo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_msg_panel_kb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_msg_panel_kb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_mute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_mute.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_mute_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_mute_blue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_pause.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_pause_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_pause_blue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_play.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_scroll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_scroll.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_send.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_small_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_small_arrow.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_backspace.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_backspace.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_backspace_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_backspace_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_bell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_bell.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_bell_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_bell_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_car.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_car.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_car_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_car_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_flower.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_flower.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_flower_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_flower_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_grid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_grid.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_grid_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_grid_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_recent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_recent.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_recent_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_recent_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_smile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_smile.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_smile_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_smile_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_sticker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_sticker.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_smiles_sticker_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-mdpi/ic_smiles_sticker_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/drawer_shadow.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/drawer_shadow.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_arrow_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_arrow_down.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_attach.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_attach.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_attach_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_attach_check.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_attach_gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_attach_gallery.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_attach_photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_attach_photo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_back.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_back_photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_back_photo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_badge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_badge.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_check.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_clock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_clock.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_download.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_download_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_download_blue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_drawer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_error.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_file.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_file_play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_file_play.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_group.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_logout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_logout.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_map_pin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_map_pin.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_menu.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_more.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_more_photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_more_photo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_msg_panel_kb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_msg_panel_kb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_mute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_mute.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_mute_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_mute_blue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_pause.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_pause_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_pause_blue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_scroll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_scroll.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_send.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_small_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_small_arrow.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_backspace.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_backspace.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_backspace_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_backspace_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_bell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_bell.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_bell_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_bell_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_car.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_car.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_car_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_car_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_flower.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_flower.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_flower_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_flower_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_grid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_grid.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_grid_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_grid_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_recent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_recent.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_recent_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_recent_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_smile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_smile.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_smile_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_smile_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_sticker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_sticker.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_smiles_sticker_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xhdpi/ic_smiles_sticker_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/drawer_shadow.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/drawer_shadow.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_arrow_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_arrow_down.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_attach.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_attach.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_attach_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_attach_check.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_attach_gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_attach_gallery.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_attach_photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_attach_photo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_back.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_back_photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_back_photo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_badge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_badge.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_check.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_clock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_clock.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_download.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_download_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_download_blue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_drawer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_drawer.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_error.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_file.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_file_pause_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_file_pause_blue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_group.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_logout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_logout.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_map_pin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_map_pin.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_menu.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_more.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_more_photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_more_photo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_msg_panel_kb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_msg_panel_kb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_pause.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_play.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_scroll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_scroll.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_send.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_small_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_small_arrow.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_backspace.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_backspace.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_backspace_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_backspace_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_bell.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_bell.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_bell_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_bell_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_car.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_car.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_car_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_car_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_flower.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_flower.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_flower_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_flower_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_grid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_grid.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_grid_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_grid_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_recent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_recent.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_recent_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_recent_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_smile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_smile.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_smile_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_smile_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_sticker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_sticker.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_smiles_sticker_active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/ic_smiles_sticker_active.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/mute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/mute.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/mute_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/mute_blue.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/test_avatar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable-xxhdpi/test_avatar.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/circular_progress_bar_blue.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 | -
8 |
11 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/circular_progress_bar_white.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 | -
8 |
11 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/forward_line.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable/forward_line.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_unread.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/app/src/main/res/drawable/ic_unread.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/list_divider.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/roundedbutton.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/roundedbutton_download.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/roundedbutton_download_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/seek_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
8 |
9 |
10 | -
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/seek_bar_thumb.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_activation.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
22 |
23 |
31 |
32 |
44 |
45 |
51 |
52 |
60 |
61 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_conversations.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
16 |
17 |
21 |
22 |
29 |
30 |
38 |
39 |
40 |
45 |
47 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_countries.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
21 |
22 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_image_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
15 |
16 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_registration.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
17 |
18 |
19 |
20 |
32 |
33 |
44 |
45 |
59 |
60 |
61 |
62 |
73 |
74 |
75 |
76 |
77 |
78 |
86 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/chat_toolbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
29 |
30 |
42 |
43 |
56 |
57 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_attach_files.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
24 |
25 |
36 |
37 |
46 |
47 |
58 |
59 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/fragment_navigation_drawer.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
14 |
15 |
24 |
25 |
36 |
37 |
49 |
50 |
61 |
62 |
71 |
72 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_chat.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
28 |
29 |
44 |
45 |
59 |
60 |
75 |
76 |
85 |
86 |
96 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_choose_photo.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
18 |
19 |
27 |
28 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_country.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
24 |
25 |
38 |
39 |
50 |
51 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/msg_audio.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
20 |
21 |
30 |
31 |
32 |
33 |
48 |
49 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/msg_document.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
15 |
16 |
30 |
31 |
44 |
45 |
51 |
52 |
59 |
60 |
61 |
62 |
73 |
74 |
86 |
87 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/msg_downloading.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
18 |
19 |
32 |
33 |
38 |
39 |
46 |
47 |
48 |
49 |
57 |
58 |
71 |
72 |
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/msg_geo_point.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/msg_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
32 |
33 |
49 |
50 |
60 |
61 |
73 |
74 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/msg_save_file.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
15 |
16 |
29 |
30 |
38 |
39 |
50 |
51 |
60 |
61 |
62 |
72 |
73 |
82 |
83 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/msg_sticker.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/msg_video.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
15 |
16 |
26 |
27 |
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/activation_code.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/chat.xml:
--------------------------------------------------------------------------------
1 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/country.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/global.xml:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/image_view.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/login_phone.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/values-v16/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #222222
4 | #AEAEAE
5 | #999999
6 | #ffdbdbdb
7 | #FFFFFF
8 | #DB7777
9 | #5B95C2
10 | #444444
11 | #212121
12 | #808080
13 | #2F8CC9
14 | #569ACE
15 | #B2B2B2
16 | #333333
17 | #EDEDED
18 | #212121
19 | #d2eafc
20 | #999999
21 | #8a8a8a
22 | #579bcf
23 | #BFBFBF
24 | #68ADE1
25 | #68ADE1
26 | #EBF2F7
27 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
8 | 300dp
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Telegram
3 |
4 | Section 1
5 | Section 2
6 | Section 3
7 |
8 | Open navigation drawer
9 | Close navigation drawer
10 |
11 | Example action
12 |
13 | Settings
14 | Phone number
15 | We will send an SMS with a confirmation code to your phone number
16 | We\'ve sent an SMS with an activation code to your phone number
17 | Code
18 | Wrong code
19 |
20 | Log Out
21 | No messages here yet...
22 | Message
23 | Phone number
24 | Activation code
25 | Country
26 | Messages
27 | Clear history
28 | Leave group
29 | Mute
30 | Save to gallery
31 | Delete
32 | Take photo
33 | Choose from gallery
34 |
35 |
36 | - #7FCBD9
37 | - #70B2D8
38 | - #7BCB81
39 | - #E48283
40 | - #EEA781
41 | - #EF83AC
42 | - #E6C26C
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/audio.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/audio.mp3
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.2.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kmormysh/Telegram/aea5963014aef268dae5d4aec18d9e6233e6dced/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 10 15:27:10 PDT 2013
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/kelegram.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------