Skip to content
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.

Commit

Permalink
support Threema
Browse files Browse the repository at this point in the history
  • Loading branch information
lucky committed Feb 7, 2022
1 parent ff511ca commit 08814ab
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Red

Redirect outgoing calls to Signal/Telegram.
Redirect outgoing calls to Signal/Telegram/Threema.

[<img
src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
Expand All @@ -16,7 +16,7 @@ Redirect outgoing calls to Signal/Telegram.
width="30%"
height="30%">

Tiny app to redirect outgoing calls to Signal/Telegram if available.
Tiny app to redirect outgoing calls to Signal/Telegram/Threema if available.

You can cancel redirection by clicking on `Redirecting to..` popup.

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "me.lucky.red"
minSdk 29
targetSdk 32
versionCode 3
versionName "1.0.2"
versionCode 5
versionName "1.0.4"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
8 changes: 6 additions & 2 deletions app/src/main/java/me/lucky/red/CallRedirectionService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ class CallRedirectionService : CallRedirectionService() {
"vnd.android.cursor.item/vnd.org.thoughtcrime.securesms.call"
private const val TELEGRAM_MIMETYPE =
"vnd.android.cursor.item/vnd.org.telegram.messenger.android.call"
private const val THREEMA_MIMETYPE =
"vnd.android.cursor.item/vnd.ch.threema.app.call"
private val MIMETYPES = mapOf(
SIGNAL_MIMETYPE to 0,
TELEGRAM_MIMETYPE to 1,
THREEMA_MIMETYPE to 2,
)
}

Expand Down Expand Up @@ -63,8 +66,9 @@ class CallRedirectionService : CallRedirectionService() {
return
}
window.show(record.uri, when (record.mimetype) {
SIGNAL_MIMETYPE -> R.string.signal
TELEGRAM_MIMETYPE -> R.string.telegram
SIGNAL_MIMETYPE -> R.string.destination_signal
TELEGRAM_MIMETYPE -> R.string.destination_telegram
THREEMA_MIMETYPE -> R.string.destination_threema
else -> return
})
}
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Red</string>
<string name="description">Приложение будет пытаться перенаправить исходящие вызовы в Signal/Telegram. Для работы ему нужно много разрешений. Кликайте на переключатель и выдавайте разрешения пока он не включится.</string>
<string name="description">Приложение будет пытаться перенаправить исходящие вызовы в Signal/Telegram/Threema. Для работы ему нужно много разрешений. Кликайте на переключатель и выдавайте разрешения пока он не включится.</string>
<string name="popup">Перенаправление в %1$s</string>
<string name="signal">Signal</string>
<string name="telegram">Telegram</string>
<string name="destination_signal">Signal</string>
<string name="destination_telegram">Telegram</string>
<string name="destination_threema">Threema</string>
<string name="redirection_delay_description">Задержка до того, как звонок будет перенаправлен.</string>
</resources>
7 changes: 4 additions & 3 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Red</string>
<string name="description">The app will try to redirect outgoing calls to Signal/Telegram if available. For work it requires many permissions. Click on the toggle and grant permissions until it turns ON.</string>
<string name="description">The app will try to redirect outgoing calls to Signal/Telegram/Threema if available. For work it requires many permissions. Click on the toggle and grant permissions until it turns ON.</string>
<string name="popup">Redirecting to %1$s</string>
<string name="signal">Signal</string>
<string name="telegram">Telegram</string>
<string name="destination_signal">Signal</string>
<string name="destination_telegram">Telegram</string>
<string name="destination_threema">Threema</string>
<string name="redirection_delay_description">Delay before a call will be redirected.</string>
</resources>
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/4.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Google dislikes my "Privacy Police" :(
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
support Threema
2 changes: 1 addition & 1 deletion fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Tiny app to redirect outgoing calls to Signal/Telegram if available.
Tiny app to redirect outgoing calls to Signal/Telegram/Threema if available.

You can cancel redirection by clicking on "Redirecting to.." popup.

Expand Down
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion fastlane/metadata/android/en-US/short_description.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Redirect outgoing calls to Signal/Telegram
Redirect outgoing calls to Signal/Telegram/Threema
2 changes: 1 addition & 1 deletion fastlane/metadata/android/ru-RU/full_description.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Минимальное приложение для перенаправления исходящих вызовов в Signal/Telegram.
Минимальное приложение для перенаправления исходящих вызовов в Signal/Telegram/Threema.

Вы можете отменить перенаправление, кликнув на всплывающее сообщение "Перенаправление в..".

Expand Down
2 changes: 1 addition & 1 deletion fastlane/metadata/android/ru-RU/short_description.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Перенаправить исходящие вызовы в Signal/Telegram
Перенаправить исходящие вызовы в Signal/Telegram/Threema

0 comments on commit 08814ab

Please sign in to comment.