diff --git a/README.md b/README.md index bfbce95..a04deb5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- Pulse Icon + Logo

@@ -12,60 +12,23 @@ Tiny app to redirect outgoing calls to Signal/Telegram/Threema/Whatsapp. --- -

- - Download on IzzyOnDroid - - - Download using Optainium - -

- ---- -

Screenshots

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

-# How to Install +You can cancel redirection by clicking on `Redirecting to..` popup. -## 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 +## Permissions * ACCESS_NETWORK_STATE - check internet is available * CALL_PHONE - make a call via messenger @@ -75,8 +38,7 @@ Install it, and you’re done! 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. @@ -84,11 +46,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](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 0637905..9e5deb2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ android { applicationId = "partisan.weforge.xyz.pulse" minSdk = 29 targetSdk = 34 - versionCode = 12 - versionName = "1.4.0" + versionCode = 10 + versionName = "1.3.1" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } 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 d5f4aa1..835f2ab 100644 --- a/app/src/main/java/partisan/weforge/xyz/pulse/PopupWindow.kt +++ b/app/src/main/java/partisan/weforge/xyz/pulse/PopupWindow.kt @@ -9,24 +9,21 @@ 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( - ctx: Context, + private val ctx: Context, private val service: WeakReference?, ) { - 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 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 layoutParams = WindowManager.LayoutParams().apply { format = PixelFormat.TRANSLUCENT flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE @@ -48,7 +45,7 @@ class PopupWindow( fun preview() { remove() layoutParams.y = prefs.popupPosition - val destinations = listOf( + val destinations = mutableListOf( R.string.destination_signal, R.string.destination_telegram, R.string.destination_threema, @@ -83,7 +80,6 @@ class PopupWindow( service.cancelCall() }, prefs.redirectionDelay) setDescription(destinationId) - startProgressAnimation(prefs.redirectionDelay) if (!add()) { timer?.cancel() service.placeCallUnmodified() @@ -91,46 +87,33 @@ class PopupWindow( } private fun setDescription(id: Int) { - view.findViewById(R.id.description).text = themedCtx.getString( + view.findViewById(R.id.description).text = ctx.getString( R.string.popup, - themedCtx.getString(id), + ctx.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).apply { - this.data = data - flags = Intent.FLAG_ACTIVITY_NEW_TASK - themedCtx.startActivity(this) + Intent(Intent.ACTION_VIEW).let { + it.data = data + it.flags = Intent.FLAG_ACTIVITY_NEW_TASK + ctx.startActivity(it) } } 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 (_: IllegalArgumentException) { - } catch (_: WindowManager.BadTokenException) { - return false - } + } catch (exc: IllegalArgumentException) { + } catch (exc: 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 deleted file mode 100644 index 8349831..0000000 --- a/app/src/main/res/drawable/progress_drawable.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/layout/popup.xml b/app/src/main/res/layout/popup.xml index 1b46631..6035cbb 100644 --- a/app/src/main/res/layout/popup.xml +++ b/app/src/main/res/layout/popup.xml @@ -1,41 +1,19 @@ - + app:cardBackgroundColor="?attr/colorSurface"> - - - - - - + android:padding="16dp" + android:textColor="?attr/colorOnSurface" + android:textSize="16sp" + android:textAppearance="?attr/textAppearanceBodyMedium" + android:textAlignment="center" /> diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index ad74a04..3e4e33f 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -7,9 +7,6 @@ @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 deleted file mode 100644 index 64cf6af..0000000 --- a/data/IzzyOnDroidButton.svg +++ /dev/null @@ -1,75 +0,0 @@ - -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 deleted file mode 100644 index 3d058b8..0000000 Binary files a/data/OptainiumButton.png and /dev/null differ diff --git a/data/icon_appstore.png b/data/icon_appstore.png index cedd458..271fb9f 100644 Binary files a/data/icon_appstore.png and b/data/icon_appstore.png differ diff --git a/data/icon_appstore.svg b/data/icon_appstore.svg index 4b1375c..5a25a11 100644 --- a/data/icon_appstore.svg +++ b/data/icon_appstore.svg @@ -1,197 +1,58 @@ - - - - - - - + + + + + + - + - - - Star + + + Star - - Star + + Star - - Star + + Star - - Star + + Star - - Star + + Star - - Star + + Star - - Star + + Star - - Star + + Star - - Star + + Star - - Star + + Star - - + + - - + + - - Star + + Star - - Star + + Star - - Star + + Star - - Star - - - Star - - - Star - - + \ No newline at end of file diff --git a/data/screenshot-redirecting.png b/data/screenshot-redirecting.png index c4df362..8054120 100644 Binary files a/data/screenshot-redirecting.png and b/data/screenshot-redirecting.png differ diff --git a/data/screenshot.png b/data/screenshot.png index 92a3059..4107576 100644 Binary files a/data/screenshot.png and b/data/screenshot.png differ diff --git a/fastlane/metadata/android/en-US/changelogs/14.txt b/fastlane/metadata/android/en-US/changelogs/14.txt deleted file mode 100644 index 01c603f..0000000 --- a/fastlane/metadata/android/en-US/changelogs/14.txt +++ /dev/null @@ -1 +0,0 @@ -Fixed crash related to redirect popup \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/images/icon.png b/fastlane/metadata/android/en-US/images/icon.png index cedd458..271fb9f 100644 Binary files a/fastlane/metadata/android/en-US/images/icon.png and b/fastlane/metadata/android/en-US/images/icon.png differ