Add push notifications

This commit is contained in:
Matte23
2020-10-29 22:53:36 +01:00
parent 8f824b81b3
commit 76b4886c6e
12 changed files with 144 additions and 19 deletions

View File

@@ -15,8 +15,10 @@
<string name="preferences_school">Scuola</string>
<string name="preferences_dark_theme">Tema scuro</string>
<string name="preferences_notify_new_circulars">Mostra notifiche</string>
<string name="preferences_polling">Esegui controllo dal telefono</string>
<string name="preferences_poll_interval">Intervallo di sincronizzazione</string>
<string name="preferences_notify_new_circulars_summary">Mostra una notifica quando una nuova circolare è pubblicata</string>
<string name="preferences_polling_summary">Sconsigliato. Disabilitare questa opzione per utilizzare le notifiche push</string>
<string name="preferences_poll_interval_summary">Quanto tempo attendere tra una sincronizzazione ed un altra</string>
<string name="notification_title">Circolare numero %1$d</string>

View File

@@ -15,8 +15,10 @@
<string name="preferences_school">School</string>
<string name="preferences_dark_theme">Dark theme</string>
<string name="preferences_notify_new_circulars">Show notifications</string>
<string name="preferences_polling">Run checks from this device</string>
<string name="preferences_poll_interval">Synchronization interval</string>
<string name="preferences_notify_new_circulars_summary">Show a notification when a new circular is published</string>
<string name="preferences_polling_summary">Not recommended. Disable this option to use push notifications</string>
<string name="preferences_poll_interval_summary">How long to wait before checking if new circulars are published</string>
<string name="notification_title">Circular letter number %1$d</string>

View File

@@ -26,9 +26,16 @@
app:key="notify_new_circulars"
app:title="@string/preferences_notify_new_circulars" />
<SwitchPreferenceCompat
android:defaultValue="false"
android:summary="@string/preferences_polling_summary"
app:dependency="notify_new_circulars"
app:key="enable_polling"
app:title="@string/preferences_polling" />
<EditTextPreference
android:defaultValue="15"
android:dependency="notify_new_circulars"
android:dependency="enable_polling"
android:key="poll_interval"
android:selectAllOnFocus="true"
android:singleLine="true"