diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml deleted file mode 100644 index 3612118..0000000 --- a/.github/workflows/android.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Android CI - -# on: -# push: -# branches: [ main ] -# pull_request: -# branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: set up JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'temurin' - cache: gradle - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle - run: ./gradlew build diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml deleted file mode 100644 index e4dd7f5..0000000 --- a/.github/workflows/gradle-wrapper-validation.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: "Validate Gradle Wrapper" -# on: [push, pull_request] - -jobs: - validation: - name: "Validation" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: gradle/wrapper-validation-action@v1 diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml deleted file mode 100644 index ffa8a15..0000000 --- a/.github/workflows/super-linter.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow executes several linters on changed files based on languages used in your code base whenever -# you push a code or open a pull request. -# -# You can adjust the behavior by modifying this file. -# For more information, see: -# https://github.com/github/super-linter -name: Lint Code Base - -# on: -# push: -# branches: [ main ] -# pull_request: -# branches: [ main ] -jobs: - run-lint: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - with: - # Full git history is needed to get a proper list of changed files within `super-linter` - fetch-depth: 0 - - - name: Lint Code Base - uses: github/super-linter@v4 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index aa724b7..cc7bb17 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ .externalNativeBuild .cxx local.properties +release-key.jks \ No newline at end of file diff --git a/README.md b/README.md index 2d08889..bfbce95 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- Logo + Pulse Icon

@@ -10,9 +10,62 @@ Tiny app to redirect outgoing calls to Signal/Telegram/Threema/Whatsapp.

-You can cancel redirection by clicking on `Redirecting to..` popup. +--- -## Permissions +

+ + Download on IzzyOnDroid + + + Download using Optainium + +

+ +--- + +

+ Screenshots +

+ +

+ + Main screen + +      + + Redirecting popup + +

+ +# How to Install + +## Using Droid-ify (or other F-Droid client) + +[Install Droid-ify from their page](https://droidify.eu.org/) + +In the app, search for "Pulse" and install it. + +*Pulse uses the IzzyOnDroid repo. Some F-Droid clients, such as F-Droid itself, do not include it by default. Please add the IzzyOnDroid repo: https://apt.izzysoft.de/fdroid/repo* + +## Using Obtainium + +[Install Obtainium](https://github.com/ImranR98/Obtainium/blob/main/README.md) + +In the “Add App” screen: + +1. Add the following URL: https://weforge.xyz/partisan/Pulse +2. In **Override Source**, select **Forgejo (Codeberg)** +3. Tap the “Add” button at the very top, and you’re done! + +## Install directly + +Go to the [Releases page](https://weforge.xyz/partisan/Pulse/releases) and download the latest file with the following format: `app-release.apk`. + +Install it, and you’re done! + +*Please note that when installing directly, the app will not receive automatic updates.* + +# Permissions * ACCESS_NETWORK_STATE - check internet is available * CALL_PHONE - make a call via messenger @@ -22,7 +75,8 @@ You can cancel redirection by clicking on `Redirecting to..` popup. All permissions are mandatory. -## License +# License + [![GNU GPLv3 Image](https://www.gnu.org/graphics/gplv3-127x51.png)](https://www.gnu.org/licenses/gpl-3.0.en.html) This application is Free Software: You can use, study share and improve it at your will. @@ -30,11 +84,11 @@ Specifically you can redistribute and/or modify it under the terms of the [GNU General Public License v3](https://www.gnu.org/licenses/gpl.html) as published by the Free Software Foundation. -### Icon Credit +## Icon Credit -Icon based on "Pulse 53" from the [Flare Dashed Icons](https://www.svgrepo.com/svg/450484/pulse) collection by [Taras Shypka](https://www.svgrepo.com/author/Taras%20Shypka/). +Icon based on "Pulse 53" from the [Flare Dashed Icons](https://www.svgrepo.com/svg/450484/pulse) collection by [Taras Shypka](https://www.svgrepo.com/author/Taras%20Shypka/). Licensed under the [Public Domain](https://www.svgrepo.com/page/licensing/#PD). -### Original Author +## Original Author -This software was originally developed by https://github.com/x13a, but it has been archived by the owner on Jun 22, 2022. \ No newline at end of file +[This software](https://github.com/x13a/Red) was originally developed by [x13a](https://github.com/x13a), but it has been archived by the owner on Jun 22, 2022. \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 7f6f5a7..0637905 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ android { applicationId = "partisan.weforge.xyz.pulse" minSdk = 29 targetSdk = 34 - versionCode = 9 - versionName = "1.3.0" + versionCode = 12 + versionName = "1.4.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } @@ -50,6 +50,13 @@ android { lint { disable += 'MissingTranslation' } + + dependenciesInfo { + // Disables dependency metadata when building APKs (for IzzyOnDroid/F-Droid) + includeInApk = false + // Disables dependency metadata when building Android App Bundles (for Google Play) + includeInBundle = false + } } dependencies { diff --git a/app/src/main/java/partisan/weforge/xyz/pulse/PopupWindow.kt b/app/src/main/java/partisan/weforge/xyz/pulse/PopupWindow.kt index 835f2ab..d5f4aa1 100644 --- a/app/src/main/java/partisan/weforge/xyz/pulse/PopupWindow.kt +++ b/app/src/main/java/partisan/weforge/xyz/pulse/PopupWindow.kt @@ -9,21 +9,24 @@ import android.net.Uri import android.view.Gravity import android.view.LayoutInflater import android.view.WindowManager +import android.view.ContextThemeWrapper import android.widget.TextView +import android.animation.ObjectAnimator +import android.widget.ProgressBar import androidx.annotation.RequiresPermission import java.lang.ref.WeakReference import java.util.* import kotlin.concurrent.timerTask class PopupWindow( - private val ctx: Context, + ctx: Context, private val service: WeakReference?, ) { - private val prefs = Preferences(ctx) - private val windowManager = ctx.getSystemService(WindowManager::class.java) - private val audioManager = ctx.getSystemService(AudioManager::class.java) - @Suppress("InflateParams") - private val view = LayoutInflater.from(ctx).inflate(R.layout.popup, null) + private val themedCtx = ContextThemeWrapper(ctx, R.style.Theme_Pulse) + private val prefs = Preferences(themedCtx) + private val windowManager = themedCtx.getSystemService(WindowManager::class.java) + private val audioManager = themedCtx.getSystemService(AudioManager::class.java) + private val view = LayoutInflater.from(themedCtx).inflate(R.layout.popup, null) private val layoutParams = WindowManager.LayoutParams().apply { format = PixelFormat.TRANSLUCENT flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE @@ -45,7 +48,7 @@ class PopupWindow( fun preview() { remove() layoutParams.y = prefs.popupPosition - val destinations = mutableListOf( + val destinations = listOf( R.string.destination_signal, R.string.destination_telegram, R.string.destination_threema, @@ -80,6 +83,7 @@ class PopupWindow( service.cancelCall() }, prefs.redirectionDelay) setDescription(destinationId) + startProgressAnimation(prefs.redirectionDelay) if (!add()) { timer?.cancel() service.placeCallUnmodified() @@ -87,33 +91,46 @@ class PopupWindow( } private fun setDescription(id: Int) { - view.findViewById(R.id.description).text = ctx.getString( + view.findViewById(R.id.description).text = themedCtx.getString( R.string.popup, - ctx.getString(id), + themedCtx.getString(id), ) } + private fun startProgressAnimation(duration: Long) { + val bar = view.findViewById(R.id.progress) + bar.max = 100 + bar.progress = 0 + val animator = ObjectAnimator.ofInt(bar, "progress", 100) + animator.duration = duration + animator.start() + } + @RequiresPermission(Manifest.permission.CALL_PHONE) private fun call(data: Uri) { - Intent(Intent.ACTION_VIEW).let { - it.data = data - it.flags = Intent.FLAG_ACTIVITY_NEW_TASK - ctx.startActivity(it) + Intent(Intent.ACTION_VIEW).apply { + this.data = data + flags = Intent.FLAG_ACTIVITY_NEW_TASK + themedCtx.startActivity(this) } } private fun add(): Boolean { try { windowManager?.addView(view, layoutParams) - } catch (exc: WindowManager.BadTokenException) { return false } + } catch (exc: WindowManager.BadTokenException) { + return false + } return true } private fun remove(): Boolean { try { windowManager?.removeView(view) - } catch (exc: IllegalArgumentException) { - } catch (exc: WindowManager.BadTokenException) { return false } + } catch (_: IllegalArgumentException) { + } catch (_: WindowManager.BadTokenException) { + return false + } return true } diff --git a/app/src/main/res/drawable/progress_drawable.xml b/app/src/main/res/drawable/progress_drawable.xml new file mode 100644 index 0000000..8349831 --- /dev/null +++ b/app/src/main/res/drawable/progress_drawable.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/popup.xml b/app/src/main/res/layout/popup.xml index 03b30b0..1b46631 100644 --- a/app/src/main/res/layout/popup.xml +++ b/app/src/main/res/layout/popup.xml @@ -1,20 +1,41 @@ - + app:cardCornerRadius="24dp" + app:cardElevation="4dp" + app:cardBackgroundColor="?attr/colorSurface" + android:background="@android:color/white"> - + android:orientation="vertical"> - \ No newline at end of file + + + + + diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 3e4e33f..ad74a04 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -7,6 +7,9 @@ @color/teal_200 @color/black - + + @color/white + @color/black + @style/TextAppearance.Material3.BodyMedium \ No newline at end of file diff --git a/data/IzzyOnDroidButton.svg b/data/IzzyOnDroidButton.svg new file mode 100644 index 0000000..64cf6af --- /dev/null +++ b/data/IzzyOnDroidButton.svg @@ -0,0 +1,75 @@ + +IzzyOnDroid ButtonGET IT ON + + +IzzyOnDroid + + +image/svg+xmlIzzyOnDroid ButtonIzzy, Wolfshappen \ No newline at end of file diff --git a/data/OptainiumButton.png b/data/OptainiumButton.png new file mode 100644 index 0000000..3d058b8 Binary files /dev/null and b/data/OptainiumButton.png differ diff --git a/data/icon.png b/data/icon.png new file mode 100644 index 0000000..b7e0249 Binary files /dev/null and b/data/icon.png differ diff --git a/data/icon_appstore.png b/data/icon_appstore.png new file mode 100644 index 0000000..cedd458 Binary files /dev/null and b/data/icon_appstore.png differ diff --git a/data/icon_appstore.svg b/data/icon_appstore.svg new file mode 100644 index 0000000..4b1375c --- /dev/null +++ b/data/icon_appstore.svg @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + Star + + + Star + + + Star + + + Star + + + Star + + + Star + + + Star + + + Star + + + Star + + + Star + + + + + + + + + Star + + + Star + + + Star + + + Star + + + Star + + + Star + + diff --git a/data/playstore-promo-graphic.png b/data/playstore-promo-graphic.png new file mode 100644 index 0000000..fd22a85 Binary files /dev/null and b/data/playstore-promo-graphic.png differ diff --git a/data/screenshot-redirecting.png b/data/screenshot-redirecting.png new file mode 100644 index 0000000..c4df362 Binary files /dev/null and b/data/screenshot-redirecting.png differ diff --git a/data/screenshot.png b/data/screenshot.png new file mode 100644 index 0000000..92a3059 Binary files /dev/null and b/data/screenshot.png differ diff --git a/fastlane/metadata/android/en-US/changelogs/10.txt b/fastlane/metadata/android/en-US/changelogs/10.txt new file mode 100644 index 0000000..1b0de33 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/10.txt @@ -0,0 +1,2 @@ +Forked from Red and renamed to Pulse. +Changed Icons and graphic. \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/changelogs/11.txt b/fastlane/metadata/android/en-US/changelogs/11.txt new file mode 100644 index 0000000..062b81d --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/11.txt @@ -0,0 +1 @@ +Added material you icon. \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/changelogs/12.txt b/fastlane/metadata/android/en-US/changelogs/12.txt new file mode 100644 index 0000000..6011cef --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/12.txt @@ -0,0 +1 @@ +Added options to toggle and change priority to individual redirect services. \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/changelogs/13.txt b/fastlane/metadata/android/en-US/changelogs/13.txt new file mode 100644 index 0000000..664f914 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/13.txt @@ -0,0 +1 @@ +Updated metadata and removed some background Google BLOB to improve compliance with IzzyOnDroid repo. \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/changelogs/14.txt b/fastlane/metadata/android/en-US/changelogs/14.txt new file mode 100644 index 0000000..01c603f --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/14.txt @@ -0,0 +1 @@ +Fixed crash related to redirect popup \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt index 6c498cd..33e0227 100644 --- a/fastlane/metadata/android/en-US/full_description.txt +++ b/fastlane/metadata/android/en-US/full_description.txt @@ -1,13 +1,13 @@ -Tiny app to redirect outgoing calls to Signal/Telegram/Threema if available. +Tiny app to redirect outgoing calls to Signal/Telegram/Threema/Whatsapp if available. You can cancel redirection by clicking on "Redirecting to.." popup. Permissions: -* ACCESS_NETWORK_STATE - check internet is available -* CALL_PHONE - make a call via messenger -* READ_CONTACTS - check contact has a messenger record -* SYSTEM_ALERT_WINDOW - show redirecting popup and launch an activity from background -* CALL_REDIRECTION - process outgoing call +* `ACCESS_NETWORK_STATE` - check internet is available +* `CALL_PHONE` - make a call via messenger +* `READ_CONTACTS` - check contact has a messenger record +* `SYSTEM_ALERT_WINDOW` - show redirecting popup and launch an activity from background +* `CALL_REDIRECTION` - process outgoing call All permissions are mandatory. diff --git a/fastlane/metadata/android/en-US/images/featureGraphic.png b/fastlane/metadata/android/en-US/images/featureGraphic.png index 4473ebc..fd22a85 100644 Binary files a/fastlane/metadata/android/en-US/images/featureGraphic.png and b/fastlane/metadata/android/en-US/images/featureGraphic.png differ diff --git a/fastlane/metadata/android/en-US/images/icon.png b/fastlane/metadata/android/en-US/images/icon.png index efc5b16..cedd458 100644 Binary files a/fastlane/metadata/android/en-US/images/icon.png and b/fastlane/metadata/android/en-US/images/icon.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png index 8b9cbff..4107576 100644 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png differ diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png new file mode 100644 index 0000000..8054120 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png differ diff --git a/fastlane/metadata/android/en-US/short_description.txt b/fastlane/metadata/android/en-US/short_description.txt index 0abcbf9..9a08a39 100644 --- a/fastlane/metadata/android/en-US/short_description.txt +++ b/fastlane/metadata/android/en-US/short_description.txt @@ -1 +1 @@ -Redirect outgoing calls to Signal/Telegram/Threema +Redirect outgoing calls to Signal/Telegram/Threema/Whatsapp diff --git a/fastlane/metadata/android/en-US/title.txt b/fastlane/metadata/android/en-US/title.txt index d30c108..fe8f965 100644 --- a/fastlane/metadata/android/en-US/title.txt +++ b/fastlane/metadata/android/en-US/title.txt @@ -1 +1 @@ -Red +Pulse \ No newline at end of file diff --git a/fastlane/metadata/android/fr-FR/full_description.txt b/fastlane/metadata/android/fr-FR/full_description.txt index d7bd9b5..52007ec 100644 --- a/fastlane/metadata/android/fr-FR/full_description.txt +++ b/fastlane/metadata/android/fr-FR/full_description.txt @@ -1,15 +1,15 @@ -Petite application redirigereant les appels sortants vers Signal/Telegram/Threema si ils sont +Petite application redirigereant les appels sortants vers Signal/Telegram/Threema/Whatsapp si ils sont disponibles. Vous pouvez annuler la redirection en cliquant sur la fenêtre contextuelle "Redirection vers...". Autorisations: -* ACCESS_NETWORK_STATE - Vérifié la disponibilité d\'accès à internet -* CALL_PHONE - Passer un appel via messenger -* READ_CONTACTS - Vérifier que le contact a un enregistreur de message -* SYSTEM_ALERT_WINDOW - Afficher une fenêtre contextuelle de redirection et lancer une activité en +* `ACCESS_NETWORK_STATE` - Vérifié la disponibilité d\'accès à internet +* `CALL_PHONE` - Passer un appel via messenger +* `READ_CONTACTS` - Vérifier que le contact a un enregistreur de message +* `SYSTEM_ALERT_WINDOW` - Afficher une fenêtre contextuelle de redirection et lancer une activité en arrière-plan -* CALL_REDIRECTION - Traiter les appels sortants +* `CALL_REDIRECTION` - Traiter les appels sortants Toutes les autorisations sont obligatoires. diff --git a/fastlane/metadata/android/fr-FR/short_description.txt b/fastlane/metadata/android/fr-FR/short_description.txt index 8eec792..f14d074 100644 --- a/fastlane/metadata/android/fr-FR/short_description.txt +++ b/fastlane/metadata/android/fr-FR/short_description.txt @@ -1 +1 @@ -Rediriger les appels sortants vers Signal/Telegram/Threema +Rediriger les appels sortants vers Signal/Telegram/Threema/Whatsapp diff --git a/fastlane/metadata/android/fr-FR/title.txt b/fastlane/metadata/android/fr-FR/title.txt index d30c108..f56e47b 100644 --- a/fastlane/metadata/android/fr-FR/title.txt +++ b/fastlane/metadata/android/fr-FR/title.txt @@ -1 +1 @@ -Red +Pulse diff --git a/fastlane/metadata/android/ru-RU/full_description.txt b/fastlane/metadata/android/ru-RU/full_description.txt index 933fa76..ac72662 100644 --- a/fastlane/metadata/android/ru-RU/full_description.txt +++ b/fastlane/metadata/android/ru-RU/full_description.txt @@ -1,14 +1,14 @@ -Мини приложение для перенаправления исходящих вызовов в Signal/Telegram/Threema. +Мини приложение для перенаправления исходящих вызовов в Signal/Telegram/Threema/Whatsapp. Вы можете отменить перенаправление, кликнув на всплывающее сообщение "Перенаправление в..". Разрешения: -* ACCESS_NETWORK_STATE - проверить наличие интернета -* CALL_PHONE - позвонить через мессенджер -* READ_CONTACTS - проверить контакт на наличие записи из мессенджера -* SYSTEM_ALERT_WINDOW - показать всплывающее сообщение о перенаправлении и запустить активити из +* `ACCESS_NETWORK_STATE` - проверить наличие интернета +* `CALL_PHONE` - позвонить через мессенджер +* `READ_CONTACTS - проверить контакт на наличие записи из мессенджера +* `SYSTEM_ALERT_WINDOW` - показать всплывающее сообщение о перенаправлении и запустить активити из фона -* CALL_REDIRECTION - обработать исходящий вызов +* `CALL_REDIRECTION` - обработать исходящий вызов Все разрешения обязательны для работы приложения. diff --git a/fastlane/metadata/android/ru-RU/short_description.txt b/fastlane/metadata/android/ru-RU/short_description.txt index 3efc5bd..b8ddc1b 100644 --- a/fastlane/metadata/android/ru-RU/short_description.txt +++ b/fastlane/metadata/android/ru-RU/short_description.txt @@ -1 +1 @@ -Перенаправление исходящих вызовов в Signal/Telegram/Threema +Перенаправление исходящих вызовов в Signal/Telegram/Threema/Whatsapp diff --git a/fastlane/metadata/android/ru-RU/title.txt b/fastlane/metadata/android/ru-RU/title.txt index d30c108..f56e47b 100644 --- a/fastlane/metadata/android/ru-RU/title.txt +++ b/fastlane/metadata/android/ru-RU/title.txt @@ -1 +1 @@ -Red +Pulse