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

- Logo + Pulse Icon

@@ -12,23 +12,60 @@ 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

-You can cancel redirection by clicking on `Redirecting to..` popup. +# How to Install -## Permissions +## 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 @@ -38,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. @@ -46,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](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 9e5deb2..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 = 10 - versionName = "1.3.1" + versionCode = 12 + versionName = "1.4.0" 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 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 6035cbb..1b46631 100644 --- a/app/src/main/res/layout/popup.xml +++ b/app/src/main/res/layout/popup.xml @@ -1,19 +1,41 @@ - + app:cardBackgroundColor="?attr/colorSurface" + android:background="@android:color/white"> - + android:orientation="vertical"> + + + + + 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_appstore.png b/data/icon_appstore.png index 271fb9f..cedd458 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 5a25a11..4b1375c 100644 --- a/data/icon_appstore.svg +++ b/data/icon_appstore.svg @@ -1,58 +1,197 @@ - - - - - - + + + + + + + - + - - - 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 + + Star + + + Star + + + Star + + diff --git a/data/screenshot-redirecting.png b/data/screenshot-redirecting.png index 8054120..c4df362 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 4107576..92a3059 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 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/images/icon.png b/fastlane/metadata/android/en-US/images/icon.png index 271fb9f..cedd458 100644 Binary files a/fastlane/metadata/android/en-US/images/icon.png and b/fastlane/metadata/android/en-US/images/icon.png differ