Added information on data collection as well as an opt-in toggle, which is not yet implemented

This commit is contained in:
denizk0461
2023-04-24 13:08:03 +02:00
parent b938352c53
commit a53232a814
7 changed files with 141 additions and 1 deletions
@@ -9,8 +9,10 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.fragment.app.viewModels import androidx.fragment.app.viewModels
import com.denizk0461.studip.BuildConfig import com.denizk0461.studip.BuildConfig
import com.denizk0461.studip.R
import com.denizk0461.studip.activity.FetcherActivity import com.denizk0461.studip.activity.FetcherActivity
import com.denizk0461.studip.databinding.FragmentSettingsBinding import com.denizk0461.studip.databinding.FragmentSettingsBinding
import com.denizk0461.studip.sheet.TextSheet
import com.denizk0461.studip.viewmodel.SettingsViewModel import com.denizk0461.studip.viewmodel.SettingsViewModel
/** /**
@@ -57,6 +59,13 @@ class SettingsFragment : AppFragment() {
} }
} }
binding.buttonDataHandling.setOnClickListener {
openBottomSheet(TextSheet(
R.string.settings_data_sheet_header,
R.string.settings_data_sheet_content
))
}
// Set click listener for the app version button // Set click listener for the app version button
binding.buttonAppVersion.setOnClickListener { binding.buttonAppVersion.setOnClickListener {
when (appVersionClick) { when (appVersionClick) {
@@ -15,6 +15,9 @@ import com.denizk0461.studip.model.DietaryPreferences
/** /**
* This class is used to display further information on a canteen offer to the user. Unlike the name * This class is used to display further information on a canteen offer to the user. Unlike the name
* implies, it displays more than just allergens. * implies, it displays more than just allergens.
*
* @param offer item to display further information on
* @param category category the offer belongs to
*/ */
class AllergenSheet( class AllergenSheet(
private val offer: CanteenOfferGroupElement, private val offer: CanteenOfferGroupElement,
@@ -0,0 +1,31 @@
package com.denizk0461.studip.sheet
import android.os.Bundle
import android.view.View
import androidx.annotation.StringRes
import com.denizk0461.studip.R
import com.denizk0461.studip.data.viewBinding
import com.denizk0461.studip.databinding.SheetTextBinding
/**
* Bottom sheet used for displaying any sort of text to the user.
*
* @param header headline for the window
* @param content content text for the window
*/
class TextSheet(
@StringRes private val header: Int,
@StringRes private val content: Int
) : AppSheet(R.layout.sheet_text) {
private val binding: SheetTextBinding by viewBinding(SheetTextBinding::bind)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding.apply {
textHeader.text = getString(header)
textContent.text = getString(content)
}
}
}
@@ -222,6 +222,49 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"/> android:layout_marginHorizontal="16dp"/>
<!-- crashlytics opt-in -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/layout_crashlytics"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="16dp"
android:paddingVertical="8dp">
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/switch_crashlytics"
android:layout_marginEnd="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:fontFamily="@font/lato_bolditalic"
android:text="@string/settings_crashlytics_title"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/settings_crashlytics_subtitle"/>
</androidx.appcompat.widget.LinearLayoutCompat>
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switch_crashlytics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- Data handling --> <!-- Data handling -->
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/button_data_handling" android:id="@+id/button_data_handling"
+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="16dp"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<TextView
android:id="@+id/text_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="22sp"
android:fontFamily="@font/lato_bolditalic"
android:paddingHorizontal="24dp"
android:layout_marginBottom="8dp"/>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical">
<TextView
android:id="@+id/text_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="web"
android:layout_marginHorizontal="24dp"
android:layout_marginBottom="24dp"/>
</androidx.core.widget.NestedScrollView>
</androidx.appcompat.widget.LinearLayoutCompat>
+11 -1
View File
@@ -91,16 +91,26 @@
<string name="settings_canteen">Mensenangebote</string> <string name="settings_canteen">Mensenangebote</string>
<string name="settings_misc">Sonstiges</string> <string name="settings_misc">Sonstiges</string>
<string name="refresh_schedule_title">Aktualisiere deinen Stud.IP-Stundenplan</string> <string name="refresh_schedule_title">Aktualisiere Deinen Stud.IP-Stundenplan</string>
<string name="refresh_schedule_subtitle">Dies wird alle Anpassungen löschen!</string> <string name="refresh_schedule_subtitle">Dies wird alle Anpassungen löschen!</string>
<string name="settings_highlight_title">Markiere meinen nächsten Kurs</string> <string name="settings_highlight_title">Markiere meinen nächsten Kurs</string>
<string name="settings_highlight_subtitle">Funktioniert nur wenn Kurse sich nicht überschneiden!</string> <string name="settings_highlight_subtitle">Funktioniert nur wenn Kurse sich nicht überschneiden!</string>
<string name="settings_quarter_title">Nutze akademisches Viertel</string> <string name="settings_quarter_title">Nutze akademisches Viertel</string>
<string name="settings_quarter_subtitle">Wo es passt</string> <string name="settings_quarter_subtitle">Wo es passt</string>
<string name="settings_allergens_title">Markiere Allergene mit einem Stern*</string> <string name="settings_allergens_title">Markiere Allergene mit einem Stern*</string>
<string name="settings_allergens_subtitle">Wird auch für Zusatzstoffe genutzt</string> <string name="settings_allergens_subtitle">Wird auch für Zusatzstoffe genutzt</string>
<string name="settings_crashlytics_title">Stimme Sammlung von Absturzreporten zu</string>
<string name="settings_crashlytics_subtitle">Daten werden anonymisiert übertragen</string> <!-- TODO is this true? -->
<string name="settings_data_title">Was passiert mit meinen Daten?</string> <string name="settings_data_title">Was passiert mit meinen Daten?</string>
<string name="settings_data_subtitle">Stiehlst du meinen Stud.IP-Login?</string> <string name="settings_data_subtitle">Stiehlst du meinen Stud.IP-Login?</string>
<string name="settings_data_sheet_header">TL;DR: nein, aber Google könnte mir Bescheid geben, falls die App mal abstürzt.</string>
<string name="settings_data_sheet_content">Die App funktioniert standalone, was bedeutet, dass sie sich niemals mit einem Server verbindet, der mir gehört. Sie ist ein Web-Scraper, also ein Programm, welches eine Internetseite öffnet und dann all die Informationen dieser Webseite herunterlädt und analysiert. In diesem Fall sind es die Webseiten der Mensen und Cafeterien des Studierendenwerks Bremen (stw-bremen.de) sowie die Stud.IP-Seite (elearning.uni-bremen.de).\n\nDies funktioniert relativ einfach für die Essenspläne, da diese Pläne öffentlich zugänglich sind. Um jedoch Deinen persönlichen Stud.IP-Stundenplan herunterzuladen, braucht die App Zugriff auf diese Webseite während Dein Account eingeloggt ist. Dies erfolgt, indem die App Dich mit deinem Account einloggen lässt - dies geschieht, wenn Du den Knopf zum Aktualisieren des Plans drückst und die App Dir die Login-Seite zeigt - und Du dann den Knopf klickst, um den Inhalt, den HTML-Quellcode, herunterzuladen. Der HTML-Quellcode beinhält Informationen darüber, was auf einer Webseite angezeigt wird und wie es aussehen soll, aber er kann niemals persönliche Details beinhalten, wie zum Beispiel Passwörter oder andere Daten, die auf Deinem Gerät vorhanden sind.\n\nDer Quellcode wird dann lokal, also auf Deinem Gerät, zu den Karten verarbeitet, die Du dann in der App sehen kannst, ohne, dass jegliche Daten irgendwohin geschickt werden müssten.\n\nEinige Daten könnten jedoch dennoch nach außen geschickt werden. Diese App nutzt \"Crashlytics\" von Google. Dies ist ein Tool, welches Absturzreporte an Google-Server schickt, wenn in der App etwas schief läuft. Diese werden genutzt, um Probleme in der App zu lösen.\n\nDies ist jedoch gemäß europäischer Datenschutz-Grundverordnung Opt-In, was bedeutet, dass Du zustimmen musst, bevor Daten nach außen geschickt werden. Du wurdest danach gefragt, als Du die App zum ersten Mal gestartet hast, und du kannst jederzeit deine Meinung ändern, indem Du den Schalter hierfür in den Einstellungen umstellst. Solltest Du dich entscheiden, keine Daten verschicken zu lassen, wird auch nichts mit Google (und mir) geteilt.\n\nSolltest du dich versichern wollen, dass wirklich keine Daten an irgendwelche Server verschickt wird (abgesehen von den Absturzreports an Google), kannst Du jederzeit das Projekt erkunden, da es Open-Source und auf meinen GitHub-Profil öffentlich zugänglich ist:\nhttps://github.com/denizk0461/studip-timetable/</string>
<string name="settings_app_version">App-Verison</string> <string name="settings_app_version">App-Verison</string>
<string name="with_love">mit ♡️ aus Bremen-Osterholz\von denizk0461 \\__*</string> <string name="with_love">mit ♡️ aus Bremen-Osterholz\von denizk0461 \\__*</string>
+10
View File
@@ -95,14 +95,24 @@
<string name="refresh_schedule_title">Refresh your Stud.IP schedule</string> <string name="refresh_schedule_title">Refresh your Stud.IP schedule</string>
<string name="refresh_schedule_subtitle">This will clear any customisations!</string> <string name="refresh_schedule_subtitle">This will clear any customisations!</string>
<string name="settings_highlight_title">Highlight next course</string> <string name="settings_highlight_title">Highlight next course</string>
<string name="settings_highlight_subtitle">Only works properly if courses don\'t overlap!</string> <string name="settings_highlight_subtitle">Only works properly if courses don\'t overlap!</string>
<string name="settings_quarter_title">Use academic quarter</string> <string name="settings_quarter_title">Use academic quarter</string>
<string name="settings_quarter_subtitle">Where applicable</string> <string name="settings_quarter_subtitle">Where applicable</string>
<string name="settings_allergens_title">Mark allergens with a star*</string> <string name="settings_allergens_title">Mark allergens with a star*</string>
<string name="settings_allergens_subtitle">Also applies to additives</string> <string name="settings_allergens_subtitle">Also applies to additives</string>
<string name="settings_crashlytics_title">Opt-in to sharing crash data</string>
<string name="settings_crashlytics_subtitle">Data will be anonymised</string> <!-- TODO is this true? -->
<string name="settings_data_title">What happens with my data?</string> <string name="settings_data_title">What happens with my data?</string>
<string name="settings_data_subtitle">Will you steal my Stud.IP login?</string> <string name="settings_data_subtitle">Will you steal my Stud.IP login?</string>
<string name="settings_data_sheet_header">TL;DR: no, but Google may let me know if the app crashes on your device.</string>
<string name="settings_data_sheet_content">This app works standalone, which is to say, it doesn\'t ever connect to a server I own. Instead, it is a web scraper, which means that it opens a website and then downloads and analyses all the data from that website by itself. In this case, those websites are the canteen websites of the Studierendenwerk Bremen (stw-bremen.de) and the Stud.IP page (elearning.uni-bremen.de).\n\nThis works fairly easily for the canteen offers, since the plans are public and anyone can access them. However, to access your personal Stud.IP schedule, the app needs access to that website, with your account logged in. This is done by letting you log into the website by yourself (which happens when you click the button to refresh the schedule and the app opens the login page) and then clicking a button to download the content, the HTML source code, of the website. The HTML source code contains information about which elements are shown on the website and how they look, but it can never contain your personal details such as passwords, or any other sensitive data you may store on your device.\n\nThe HTML source is then processed locally on your device, which means that your device will handle converting the HTML source to the cards you will be shown in the app by itself, without needing to send any data anywhere.\n\nHowever, some data may still be sent outside of your device. This app uses \"Crashlytics\" by Google, which is a tool that sends crash reports to Google servers if something breaks. These are used to fix problems that occur in the app.\n\nThis, in compliance with the European General Data Protection Regulation, is of course opt-in, which means that you need to accept this before any data is sent outside of your device. You have been prompted for this when you first started the app, and you can always change your mind in the app settings by clicking the corresponding switch. Should you choose to not share crash data with Google (and me), no data will be sent outside of your device.\n\nShould you want to reassure yourself that no data is sent to any servers (outside of the crash reports from Google), feel free to explore the project, since it is open-source and documented on my GitHub profile:\nhttps://github.com/denizk0461/studip-timetable/</string>
<string name="settings_app_version">App Version</string> <string name="settings_app_version">App Version</string>
<string name="with_love">with ♡️ from Bremen-Osterholz\nmade by denizk0461 \\__*</string> <string name="with_love">with ♡️ from Bremen-Osterholz\nmade by denizk0461 \\__*</string>