From a53232a81419125fa6e071b89c5a0b1e76be2e01 Mon Sep 17 00:00:00 2001 From: denizk0461 Date: Mon, 24 Apr 2023 13:08:03 +0200 Subject: [PATCH] Added information on data collection as well as an opt-in toggle, which is not yet implemented --- .../studip/fragment/SettingsFragment.kt | 9 ++++ .../denizk0461/studip/sheet/AllergenSheet.kt | 3 ++ .../com/denizk0461/studip/sheet/TextSheet.kt | 31 +++++++++++++ app/src/main/res/layout/fragment_settings.xml | 43 +++++++++++++++++++ app/src/main/res/layout/sheet_text.xml | 34 +++++++++++++++ app/src/main/res/values-de/strings.xml | 12 +++++- app/src/main/res/values/strings.xml | 10 +++++ 7 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 app/src/main/java/com/denizk0461/studip/sheet/TextSheet.kt create mode 100644 app/src/main/res/layout/sheet_text.xml diff --git a/app/src/main/java/com/denizk0461/studip/fragment/SettingsFragment.kt b/app/src/main/java/com/denizk0461/studip/fragment/SettingsFragment.kt index d1be148..67aab0f 100644 --- a/app/src/main/java/com/denizk0461/studip/fragment/SettingsFragment.kt +++ b/app/src/main/java/com/denizk0461/studip/fragment/SettingsFragment.kt @@ -9,8 +9,10 @@ import android.view.View import android.view.ViewGroup import androidx.fragment.app.viewModels import com.denizk0461.studip.BuildConfig +import com.denizk0461.studip.R import com.denizk0461.studip.activity.FetcherActivity import com.denizk0461.studip.databinding.FragmentSettingsBinding +import com.denizk0461.studip.sheet.TextSheet 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 binding.buttonAppVersion.setOnClickListener { when (appVersionClick) { diff --git a/app/src/main/java/com/denizk0461/studip/sheet/AllergenSheet.kt b/app/src/main/java/com/denizk0461/studip/sheet/AllergenSheet.kt index 15ad6ae..81548a1 100644 --- a/app/src/main/java/com/denizk0461/studip/sheet/AllergenSheet.kt +++ b/app/src/main/java/com/denizk0461/studip/sheet/AllergenSheet.kt @@ -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 * implies, it displays more than just allergens. + * + * @param offer item to display further information on + * @param category category the offer belongs to */ class AllergenSheet( private val offer: CanteenOfferGroupElement, diff --git a/app/src/main/java/com/denizk0461/studip/sheet/TextSheet.kt b/app/src/main/java/com/denizk0461/studip/sheet/TextSheet.kt new file mode 100644 index 0000000..5477408 --- /dev/null +++ b/app/src/main/java/com/denizk0461/studip/sheet/TextSheet.kt @@ -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) + } + } +} \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml index 9813f70..7e4577e 100644 --- a/app/src/main/res/layout/fragment_settings.xml +++ b/app/src/main/res/layout/fragment_settings.xml @@ -222,6 +222,49 @@ android:layout_height="wrap_content" android:layout_marginHorizontal="16dp"/> + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 8fd423d..12feeda 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -91,16 +91,26 @@ Mensenangebote Sonstiges - Aktualisiere deinen Stud.IP-Stundenplan + Aktualisiere Deinen Stud.IP-Stundenplan Dies wird alle Anpassungen löschen! + Markiere meinen nächsten Kurs Funktioniert nur wenn Kurse sich nicht überschneiden! + Nutze akademisches Viertel Wo es passt + Markiere Allergene mit einem Stern* Wird auch für Zusatzstoffe genutzt + + Stimme Sammlung von Absturzreporten zu + Daten werden anonymisiert übertragen + Was passiert mit meinen Daten? Stiehlst du meinen Stud.IP-Login? + TL;DR: nein, aber Google könnte mir Bescheid geben, falls die App mal abstürzt. + 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/ + App-Verison mit ♡️ aus Bremen-Osterholz\von denizk0461 \\__* diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 57a73b1..86e2379 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -95,14 +95,24 @@ Refresh your Stud.IP schedule This will clear any customisations! + Highlight next course Only works properly if courses don\'t overlap! + Use academic quarter Where applicable + Mark allergens with a star* Also applies to additives + + Opt-in to sharing crash data + Data will be anonymised + What happens with my data? Will you steal my Stud.IP login? + TL;DR: no, but Google may let me know if the app crashes on your device. + 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/ + App Version with ♡️ from Bremen-Osterholz\nmade by denizk0461 \\__*