Compare commits

...
Sign in to create a new pull request.

9 commits

Author SHA1 Message Date
Patrick Schneider
34739f3714 [update] bumps version. 2025-08-03 14:53:15 +02:00
Patrick Schneider
733b0c7283 [fix] Adds dialog to ManageExerciseSetsActivity 2025-08-03 14:52:25 +02:00
Patrick Schneider
4b02cbd332 [update] bumps version.
Corrects dialog description.
2025-08-03 14:52:25 +02:00
coderPaddyS
8a64360399 Adds goodbye google dialog. 2025-08-03 14:52:25 +02:00
Patrick Schneider
1911e67126 Fixes character encoding errors due to unsupported terminal font 2025-08-03 14:52:25 +02:00
Patrick Schneider
c83df12468 fixup: escape single ' in english dialog 2025-08-03 14:52:24 +02:00
Patrick Schneider
55b3dd7817 Fixes copy-paste error regarding package 2025-08-03 14:52:24 +02:00
Patrick Schneider
5504092319 Adds strings for goodbye google dialog 2025-08-03 14:52:24 +02:00
Patrick Schneider
f3bfabc3d1 Initial goodbye google dialog 2025-08-03 14:52:24 +02:00
8 changed files with 104 additions and 2 deletions

View file

@ -10,8 +10,8 @@ android {
applicationId "org.secuso.aktivpause"
minSdkVersion 21
targetSdkVersion 34
versionCode 11
versionName "1.2.2"
versionCode 13
versionName "1.2.3-google"
vectorDrawables.useSupportLibrary = true
}
buildTypes {

View file

@ -0,0 +1,38 @@
package org.secuso.aktivpause;
import android.content.Context
import android.graphics.text.LineBreaker
import android.os.Build
import android.preference.PreferenceManager
import android.text.method.LinkMovementMethod
import android.view.LayoutInflater
import android.widget.CheckBox
import android.widget.TextView
import androidx.appcompat.app.AlertDialog
fun checkGoodbyeGoogle(context: Context, layoutInflater: LayoutInflater) {
val showNotice = PreferenceManager.getDefaultSharedPreferences(context).getBoolean("show_goodbye_google_notice", true);
if (showNotice) {
val view = layoutInflater.inflate(R.layout.dialog_goodbye_google, null, false)
view.findViewById<CheckBox>(R.id.show_notice_checkbox).apply {
setOnClickListener {
PreferenceManager.getDefaultSharedPreferences(context).edit().putBoolean("show_goodbye_google_notice", !isChecked).apply()
}
}
val dialog = AlertDialog.Builder(context)
.setView(view)
.setNeutralButton(android.R.string.ok) { _, _ -> }
.setCancelable(false)
.create()
dialog.show()
dialog.findViewById<TextView>(R.id.text)?.apply {
movementMethod = LinkMovementMethod.getInstance()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
justificationMode = LineBreaker.JUSTIFICATION_MODE_INTER_WORD
}
}
}
}

View file

@ -34,6 +34,7 @@ import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import org.secuso.aktivpause.GoodbyeGoogleHelperKt;
import org.secuso.aktivpause.activities.tutorial.FirstLaunchManager;
import org.secuso.aktivpause.exercises.ExerciseLocale;
import org.secuso.aktivpause.R;
@ -76,6 +77,7 @@ public class ManageExerciseSetsActivity extends BaseActivity implements LoaderMa
initResources();
getSupportLoaderManager().initLoader(0, null, this);
GoodbyeGoogleHelperKt.checkGoodbyeGoogle(this, getLayoutInflater());
}
private void initResources() {

View file

@ -32,6 +32,7 @@ import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import org.secuso.aktivpause.GoodbyeGoogleHelperKt;
import org.secuso.aktivpause.activities.tutorial.FirstLaunchManager;
import org.secuso.aktivpause.exercises.ExerciseLocale;
import org.secuso.aktivpause.R;
@ -136,6 +137,7 @@ public class TimerActivity extends BaseActivity implements LoaderManager.LoaderC
}
getSupportLoaderManager().initLoader(0, null, this);
GoodbyeGoogleHelperKt.checkGoodbyeGoogle(this, getLayoutInflater());
}
@Override

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="@android:color/transparent" />
<stroke android:width="4dp" android:color="#880000"/>
</shape>

View file

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingHorizontal="32dp"
android:background="@drawable/dialog_border"
android:padding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@android:drawable/ic_dialog_alert"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:tint="@color/red"/>
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dialog_goodbye_google_title"
android:textStyle="bold"
android:textSize="16dp"
android:layout_gravity="center"
android:padding="8dp"
/>
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dialog_goodbye_google_desc"
/>
</ScrollView>
<com.google.android.material.checkbox.MaterialCheckBox
android:id="@+id/show_notice_checkbox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/dialog_goodbye_google_deactivate_notice"
/>
</LinearLayout>

View file

@ -177,4 +177,8 @@
<string name="dialog_evaluation_yes">Ja</string>
<string name="menu_display_evaluation_dialog">Online-Befragung</string>
<string name="dialog_goodbye_google_title">Wir verlassen Google Play 😢</string>
<string name="dialog_goodbye_google_desc">Unsere Apps müssen sich leider von Google Play verabschieden. Die App ist weiterhin nutzbar, erhält jedoch keine Updates mehr.\nWeitere Informationen zu den Gründen und warum das nicht das Ende der Privacy Friendly Apps ist, finden Sie auf unserer Website:\n\n<a href="https://secuso.aifb.kit.edu/2809.php">Hier klicken, um mehr zu erfahren</a>
</string>
<string name="dialog_goodbye_google_deactivate_notice">Zeige diese Mitteilung nicht nochmal</string>
</resources>

View file

@ -170,4 +170,8 @@
<string name="menu_display_evaluation_dialog">Online Evaluation</string>
<string name="dialog_goodbye_google_title">Goodbye Google Play 😢</string>
<string name="dialog_goodbye_google_desc">Unfortunately, our apps have to say goodbye to Google Play. The app is still usable but will not receive any updates in the future.\nYou can find more information about the reasons why this is not the end of the Privacy Friendly Apps on our website:\n\n<a href="https://secuso.aifb.kit.edu/english/2809.php">Click here to learn more</a>
</string>
<string name="dialog_goodbye_google_deactivate_notice">Don\'t show this notice again.</string>
</resources>