Compare commits
9 commits
master
...
goodbye-go
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
34739f3714 | ||
|
|
733b0c7283 | ||
|
|
4b02cbd332 | ||
|
|
8a64360399 | ||
|
|
1911e67126 | ||
|
|
c83df12468 | ||
|
|
55b3dd7817 | ||
|
|
5504092319 | ||
|
|
f3bfabc3d1 |
8 changed files with 104 additions and 2 deletions
|
|
@ -10,8 +10,8 @@ android {
|
||||||
applicationId "org.secuso.aktivpause"
|
applicationId "org.secuso.aktivpause"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 34
|
targetSdkVersion 34
|
||||||
versionCode 11
|
versionCode 13
|
||||||
versionName "1.2.2"
|
versionName "1.2.3-google"
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -34,6 +34,7 @@ import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import org.secuso.aktivpause.GoodbyeGoogleHelperKt;
|
||||||
import org.secuso.aktivpause.activities.tutorial.FirstLaunchManager;
|
import org.secuso.aktivpause.activities.tutorial.FirstLaunchManager;
|
||||||
import org.secuso.aktivpause.exercises.ExerciseLocale;
|
import org.secuso.aktivpause.exercises.ExerciseLocale;
|
||||||
import org.secuso.aktivpause.R;
|
import org.secuso.aktivpause.R;
|
||||||
|
|
@ -76,6 +77,7 @@ public class ManageExerciseSetsActivity extends BaseActivity implements LoaderMa
|
||||||
|
|
||||||
initResources();
|
initResources();
|
||||||
getSupportLoaderManager().initLoader(0, null, this);
|
getSupportLoaderManager().initLoader(0, null, this);
|
||||||
|
GoodbyeGoogleHelperKt.checkGoodbyeGoogle(this, getLayoutInflater());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initResources() {
|
private void initResources() {
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import org.secuso.aktivpause.GoodbyeGoogleHelperKt;
|
||||||
import org.secuso.aktivpause.activities.tutorial.FirstLaunchManager;
|
import org.secuso.aktivpause.activities.tutorial.FirstLaunchManager;
|
||||||
import org.secuso.aktivpause.exercises.ExerciseLocale;
|
import org.secuso.aktivpause.exercises.ExerciseLocale;
|
||||||
import org.secuso.aktivpause.R;
|
import org.secuso.aktivpause.R;
|
||||||
|
|
@ -136,6 +137,7 @@ public class TimerActivity extends BaseActivity implements LoaderManager.LoaderC
|
||||||
}
|
}
|
||||||
|
|
||||||
getSupportLoaderManager().initLoader(0, null, this);
|
getSupportLoaderManager().initLoader(0, null, this);
|
||||||
|
GoodbyeGoogleHelperKt.checkGoodbyeGoogle(this, getLayoutInflater());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
5
app/src/main/res/drawable/dialog_border.xml
Normal file
5
app/src/main/res/drawable/dialog_border.xml
Normal 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>
|
||||||
47
app/src/main/res/layout/dialog_goodbye_google.xml
Normal file
47
app/src/main/res/layout/dialog_goodbye_google.xml
Normal 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>
|
||||||
|
|
@ -177,4 +177,8 @@
|
||||||
<string name="dialog_evaluation_yes">Ja</string>
|
<string name="dialog_evaluation_yes">Ja</string>
|
||||||
<string name="menu_display_evaluation_dialog">Online-Befragung</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>
|
</resources>
|
||||||
|
|
@ -170,4 +170,8 @@
|
||||||
<string name="menu_display_evaluation_dialog">Online Evaluation</string>
|
<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>
|
</resources>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue