From ef09f36109d84241ea2dc39d94b92b46e8bae031 Mon Sep 17 00:00:00 2001 From: emanuele-f Date: Thu, 21 Jan 2021 22:53:42 +0100 Subject: [PATCH] Change telegram channel to group --- .../com/emanuelef/remote_capture/MainActivity.java | 10 +++++----- app/src/main/res/menu/settings_menu.xml | 4 ++-- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/emanuelef/remote_capture/MainActivity.java b/app/src/main/java/com/emanuelef/remote_capture/MainActivity.java index f89f8490..94660c3b 100644 --- a/app/src/main/java/com/emanuelef/remote_capture/MainActivity.java +++ b/app/src/main/java/com/emanuelef/remote_capture/MainActivity.java @@ -67,7 +67,7 @@ public class MainActivity extends AppCompatActivity implements LoaderManager.Loa private static final int MENU_ITEM_APP_SELECTOR_IDX = 0; public static final int OPERATION_SEARCH_LOADER = 23; - public static final String TELEGRAM_CHANNEL_NAME = "PCAPdroid"; + public static final String TELEGRAM_GROUP_NAME = "PCAPdroid"; public static final String GITHUB_PROJECT_URL = "https://github.com/emanuele-f/PCAPdroid"; public static final String GITHUB_DOCS_URL = "https://emanuele-f.github.io/PCAPdroid"; @@ -219,17 +219,17 @@ public class MainActivity extends AppCompatActivity implements LoaderManager.Loa return true; } - private void openTelegramChannel() { + private void openTelegram() { Intent intent = null; try { getPackageManager().getPackageInfo("org.telegram.messenger", 0); // Open directly into the telegram app - intent = new Intent(Intent.ACTION_VIEW, Uri.parse("tg://resolve?domain=" + TELEGRAM_CHANNEL_NAME)); + intent = new Intent(Intent.ACTION_VIEW, Uri.parse("tg://resolve?domain=" + TELEGRAM_GROUP_NAME)); } catch (Exception e) { // Telegram not found, open in the browser - intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://t.me/" + TELEGRAM_CHANNEL_NAME)); + intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://t.me/" + TELEGRAM_GROUP_NAME)); } if(intent != null) @@ -261,7 +261,7 @@ public class MainActivity extends AppCompatActivity implements LoaderManager.Loa startActivity(browserIntent); return true; } else if (id == R.id.action_open_telegram) { - openTelegramChannel(); + openTelegram(); return true; } else if (id == R.id.action_open_user_guide) { Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(GITHUB_DOCS_URL)); diff --git a/app/src/main/res/menu/settings_menu.xml b/app/src/main/res/menu/settings_menu.xml index dd8b39b4..9f4cf4a2 100644 --- a/app/src/main/res/menu/settings_menu.xml +++ b/app/src/main/res/menu/settings_menu.xml @@ -33,7 +33,7 @@ @@ -45,4 +45,4 @@ app:showAsAction="never" /> - \ No newline at end of file + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c64fd551..75c9969c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -62,7 +62,7 @@ TLS Decryption User Guide Rate App - Telegram Channel + Telegram Group Github Project YES NO