Archived
Added a dialog providing help for those not receiving notifications
This commit is contained in:
@@ -93,6 +93,7 @@ internal class SettingsFragment : Fragment(R.layout.content_settings), View.OnCl
|
||||
helpCourses.setOnClickListener(this)
|
||||
helpClasses.setOnClickListener(this)
|
||||
btnCustomiseColours.setOnClickListener(this)
|
||||
view.findViewById<LinearLayout>(R.id.btnNoNotif).setOnClickListener(this)
|
||||
view.findViewById<LinearLayout>(R.id.btnCustomiseRingtone).setOnClickListener(this)
|
||||
view.findViewById<LinearLayout>(R.id.btnWebsite).setOnClickListener(this)
|
||||
view.findViewById<LinearLayout>(R.id.btnLicences).setOnClickListener(this)
|
||||
@@ -153,6 +154,7 @@ internal class SettingsFragment : Fragment(R.layout.content_settings), View.OnCl
|
||||
R.string.enterGradeHelp
|
||||
))
|
||||
R.id.btnCustomiseColours -> createColourDialog()
|
||||
R.id.btnNoNotif -> createDialog(mContext.getString(R.string.notReceivingNotifications1), mContext.getString(R.string.notReceivingNotificationsHelp))
|
||||
R.id.btnCustomiseRingtone -> createRingtoneDialog()
|
||||
R.id.btnWebsite -> {
|
||||
try {
|
||||
|
||||
@@ -50,19 +50,19 @@
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/txtLayoutName"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
app:boxStrokeColor="@color/colorAccent"
|
||||
app:boxStrokeWidth="1dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:hint="@string/yourName"
|
||||
android:importantForAutofill="no"
|
||||
android:textColorHint="@color/colorHint"
|
||||
app:boxStrokeColor="@color/colorAccent"
|
||||
app:boxStrokeWidth="1dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtPersonalise"
|
||||
android:importantForAutofill="no">
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtPersonalise">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/txtName"
|
||||
@@ -176,10 +176,10 @@
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toTopOf="@+id/txtNotifications"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtRestart"
|
||||
app:layout_constraintBottom_toTopOf="@+id/txtNotifications"/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtRestart" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtNotifications"
|
||||
@@ -201,9 +201,9 @@
|
||||
android:textAlignment="textStart"
|
||||
android:textColor="@color/colorHint"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/txtNoNotif1"
|
||||
app:layout_constraintStart_toStartOf="@+id/txtNotifications"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtNotifications"
|
||||
app:layout_constraintBottom_toTopOf="@+id/txtCustomiseRingtone"/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtNotifications" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/switchNotifications"
|
||||
@@ -212,11 +212,49 @@
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="end|center"
|
||||
app:layout_constraintBottom_toTopOf="@+id/txtCustomiseRingtone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/txtNoNotif1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/txtNotifications"
|
||||
app:layout_constraintTop_toTopOf="@+id/txtNotifications" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtNoNotif1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/notReceivingNotifications1"
|
||||
android:textColor="@color/colorText"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/txtNotifiedAbout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtNotifiedAbout" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtNoNotif2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/notReceivingNotifications2"
|
||||
android:textColor="@color/colorHint"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/txtCustomiseRingtone"
|
||||
app:layout_constraintStart_toStartOf="@+id/txtNoNotif1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtNoNotif1" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btnNoNotif"
|
||||
style="@style/SelectableItemBackground"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toTopOf="@+id/txtCustomiseRingtone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtNotifiedAbout" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtCustomiseRingtone"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -226,7 +264,7 @@
|
||||
android:textColor="@color/colorText"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/txtNotifiedAbout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtNotifiedAbout" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtNoNotif2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtCustomiseRingtone2"
|
||||
@@ -236,9 +274,9 @@
|
||||
android:text="@string/setRingtone2"
|
||||
android:textColor="@color/colorHint"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/txtCustomiseRingtone"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtCustomiseRingtone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtCustomiseRingtone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btnCustomiseRingtone"
|
||||
@@ -250,10 +288,10 @@
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtNotifiedAbout"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtNoNotif2" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
@@ -138,4 +138,7 @@
|
||||
<string name="success">Erfolg</string>
|
||||
<string name="restoreFromFile">von Datei wiederherstellen</string>
|
||||
<string name="or">du kannst auch…</string>
|
||||
<string name="notReceivingNotifications1">Benachrichtigungen kommen nicht an?</string>
|
||||
<string name="notReceivingNotifications2">Klick hier um zu sehen, warum</string>
|
||||
<string name="notReceivingNotificationsHelp">Bemerke, dass diese Tipps insbesondere auf Huawei/Honor-Geräten nicht funktionieren könnten. Du kannst sie trotzdem ausprobieren.\n\nAkkusparfunktionen können dazu führen, dass Benachrichtigungen nicht ankommen. Versuche, Akkusparmodi auf deren Standardeinstellung zu setzen.\n\nEinige Geräte beschränken Apps im Hintergrund. Suche in deinen Geräteeinstellungen unter Apps die Vertretungsplan-App und schaue dann nach einer Einstellung namens \"Hintergrund-Services beschränken\" (oder ähnlich) und stelle sicher, dass diese ausgestellt ist.\n\nBei Schwierigkeiten kann ich auch gerne helfen.</string>
|
||||
</resources>
|
||||
@@ -152,4 +152,7 @@
|
||||
<string name="success">Success</string>
|
||||
<string name="restoreFromFile">Restore from file</string>
|
||||
<string name="or">you may also…</string>
|
||||
<string name="notReceivingNotifications1">Not receiving notifications?</string>
|
||||
<string name="notReceivingNotifications2">Click to see why</string>
|
||||
<string name="notReceivingNotificationsHelp">Note: on Huawei/Honor devices, there may not be a solution to this problem. You\'re welcome to try the tips provided.\n\nBattery saver functions often cause notifications to be delayed or not be received at all. Try setting any battery saving options to their default setting.\n\nSome devices restrict background usage of apps. Please go to your device app settings, select the app and check for a toggle named \"Restrict background usage\" (or similar) and verify that the setting is turned off.\n\nYou\'re also welcome to ask me for help.</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user