diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index f2df392b..28c03a77 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -138,8 +138,9 @@
android:enabled="true"
android:exported="false">
+
-
+
diff --git a/app/src/main/java/io/heckel/ntfy/app/Application.kt b/app/src/main/java/io/heckel/ntfy/app/Application.kt
index bc06f046..da9219ea 100644
--- a/app/src/main/java/io/heckel/ntfy/app/Application.kt
+++ b/app/src/main/java/io/heckel/ntfy/app/Application.kt
@@ -3,8 +3,6 @@ package io.heckel.ntfy.app
import android.app.Application
import android.net.ConnectivityManager
import android.net.Network
-import android.net.NetworkCapabilities
-import android.net.NetworkRequest
import com.google.android.material.color.DynamicColors
import io.heckel.ntfy.db.Repository
import io.heckel.ntfy.service.SubscriberServiceManager
@@ -34,10 +32,7 @@ class Application : Application() {
private fun registerNetworkCallback() {
val connectivityManager = getSystemService(CONNECTIVITY_SERVICE) as ConnectivityManager
- val networkRequest = NetworkRequest.Builder()
- .addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
- .build()
- connectivityManager.registerNetworkCallback(networkRequest, object : ConnectivityManager.NetworkCallback() {
+ connectivityManager.registerDefaultNetworkCallback(object : ConnectivityManager.NetworkCallback() {
override fun onAvailable(network: Network) {
SubscriberServiceManager.refresh(this@Application)
}
diff --git a/app/src/main/java/io/heckel/ntfy/db/Repository.kt b/app/src/main/java/io/heckel/ntfy/db/Repository.kt
index fc3dd561..6d024ecd 100644
--- a/app/src/main/java/io/heckel/ntfy/db/Repository.kt
+++ b/app/src/main/java/io/heckel/ntfy/db/Repository.kt
@@ -447,6 +447,7 @@ class Repository(private val sharedPrefs: SharedPreferences, database: Database)
fun setConnectionAlertSeconds(seconds: Long) {
sharedPrefs.edit {
putLong(SHARED_PREFS_CONNECTION_ALERT_SECONDS, seconds)
+ putLong(SHARED_PREFS_CONNECTION_ALERT_SNOOZE_UNTIL, 0L)
}
}
diff --git a/app/src/main/java/io/heckel/ntfy/service/SubscriberService.kt b/app/src/main/java/io/heckel/ntfy/service/SubscriberService.kt
index 189537a0..94a37d76 100644
--- a/app/src/main/java/io/heckel/ntfy/service/SubscriberService.kt
+++ b/app/src/main/java/io/heckel/ntfy/service/SubscriberService.kt
@@ -11,8 +11,7 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.pm.ServiceInfo
-import android.net.ConnectivityManager
-import android.net.NetworkCapabilities
+import io.heckel.ntfy.util.isNetworkAvailable
import android.os.Build
import android.os.IBinder
import android.os.PowerManager
@@ -30,6 +29,7 @@ import io.heckel.ntfy.ui.Colors
import io.heckel.ntfy.ui.MainActivity
import io.heckel.ntfy.util.HttpUtil
import io.heckel.ntfy.util.Log
+import io.heckel.ntfy.util.shortUrl
import io.heckel.ntfy.util.topicUrl
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
@@ -320,7 +320,7 @@ class SubscriberService : Service() {
if (thresholdSeconds <= 0L) return
// Don't show alert if the device has no network connectivity (e.g. airplane mode)
- if (!isNetworkAvailable()) return
+ if (!isNetworkAvailable(this)) return
val now = System.currentTimeMillis()
@@ -342,14 +342,6 @@ class SubscriberService : Service() {
}
}
- private fun isNetworkAvailable(): Boolean {
- val connectivityManager = getSystemService(CONNECTIVITY_SERVICE) as ConnectivityManager
- val network = connectivityManager.activeNetwork ?: return false
- val capabilities = connectivityManager.getNetworkCapabilities(network) ?: return false
- return capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
- && capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED)
- }
-
private fun maybeAutoDismissConnectionAlert() {
val allDetails = repository.getConnectionDetails()
val anyStillDisconnected = allDetails.any { (_, details) ->
@@ -362,7 +354,7 @@ class SubscriberService : Service() {
private fun showConnectionAlertNotification(disconnectedUrls: Set, thresholdMinutes: Int) {
val text = if (disconnectedUrls.size == 1) {
- getString(R.string.connection_alert_text_one, disconnectedUrls.first(), thresholdMinutes)
+ getString(R.string.connection_alert_text_one, shortUrl(disconnectedUrls.first()), thresholdMinutes)
} else {
getString(R.string.connection_alert_text_multiple, disconnectedUrls.size, thresholdMinutes)
}
@@ -374,11 +366,11 @@ class SubscriberService : Service() {
Intent(this, ConnectionAlertBroadcastReceiver::class.java).apply { action = CONNECTION_ALERT_ACTION_SNOOZE },
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
val disableIntent = PendingIntent.getBroadcast(this, 1,
- Intent(this, ConnectionAlertBroadcastReceiver::class.java).apply { action = CONNECTION_ALERT_ACTION_DISABLE },
+ Intent(this, ConnectionAlertBroadcastReceiver::class.java).apply { action = CONNECTION_ALERT_ACTION_NEVER },
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
val deleteIntent = PendingIntent.getBroadcast(this, 2,
- Intent(this, ConnectionAlertBroadcastReceiver::class.java).apply { action = CONNECTION_ALERT_ACTION_SNOOZE },
+ Intent(this, ConnectionAlertBroadcastReceiver::class.java).apply { action = CONNECTION_ALERT_ACTION_DISMISS },
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
val notification = NotificationCompat.Builder(this, NOTIFICATION_CONNECTION_ALERT_CHANNEL_ID)
@@ -392,7 +384,7 @@ class SubscriberService : Service() {
.setOnlyAlertOnce(true)
.setDeleteIntent(deleteIntent)
.addAction(NotificationCompat.Action.Builder(0, getString(R.string.connection_alert_action_snooze, CONNECTION_ALERT_SNOOZE_HOURS), snoozeIntent).build())
- .addAction(NotificationCompat.Action.Builder(0, getString(R.string.connection_alert_action_disable), disableIntent).build())
+ .addAction(NotificationCompat.Action.Builder(0, getString(R.string.connection_alert_action_never), disableIntent).build())
.build()
Log.d(TAG, "Showing connection alert notification")
@@ -511,10 +503,13 @@ class SubscriberService : Service() {
val repository = Repository.getInstance(context)
val notificationManager = context.getSystemService(NOTIFICATION_SERVICE) as NotificationManager
when (intent.action) {
+ CONNECTION_ALERT_ACTION_DISMISS -> {
+ repository.setConnectionAlertSnoozeUntil(System.currentTimeMillis() + CONNECTION_ALERT_DISMISS_SNOOZE_MILLIS)
+ }
CONNECTION_ALERT_ACTION_SNOOZE -> {
repository.setConnectionAlertSnoozeUntil(System.currentTimeMillis() + CONNECTION_ALERT_SNOOZE_DURATION_MILLIS)
}
- CONNECTION_ALERT_ACTION_DISABLE -> {
+ CONNECTION_ALERT_ACTION_NEVER -> {
repository.setConnectionAlertSeconds(Repository.CONNECTION_ALERT_NEVER)
}
else -> return
@@ -543,7 +538,9 @@ class SubscriberService : Service() {
private const val NOTIFICATION_CONNECTION_ALERT_ID = 2587
private const val CONNECTION_ALERT_SNOOZE_HOURS = 8
private const val CONNECTION_ALERT_SNOOZE_DURATION_MILLIS = CONNECTION_ALERT_SNOOZE_HOURS * 60 * 60 * 1000L
+ private const val CONNECTION_ALERT_DISMISS_SNOOZE_MILLIS = 1 * 60 * 60 * 1000L /*1 hour*/
+ private const val CONNECTION_ALERT_ACTION_DISMISS = "io.heckel.ntfy.CONNECTION_ALERT_DISMISS"
private const val CONNECTION_ALERT_ACTION_SNOOZE = "io.heckel.ntfy.CONNECTION_ALERT_SNOOZE"
- private const val CONNECTION_ALERT_ACTION_DISABLE = "io.heckel.ntfy.CONNECTION_ALERT_DISABLE"
+ private const val CONNECTION_ALERT_ACTION_NEVER = "io.heckel.ntfy.CONNECTION_ALERT_NEVER"
}
}
diff --git a/app/src/main/java/io/heckel/ntfy/service/SubscriberServiceManager.kt b/app/src/main/java/io/heckel/ntfy/service/SubscriberServiceManager.kt
index 8109e66d..a8fe62bc 100644
--- a/app/src/main/java/io/heckel/ntfy/service/SubscriberServiceManager.kt
+++ b/app/src/main/java/io/heckel/ntfy/service/SubscriberServiceManager.kt
@@ -3,8 +3,7 @@ package io.heckel.ntfy.service
import android.app.NotificationManager
import android.content.Context
import android.content.Intent
-import android.net.ConnectivityManager
-import android.net.NetworkCapabilities
+import io.heckel.ntfy.util.isNetworkAvailable
import androidx.core.content.ContextCompat
import androidx.work.*
import io.heckel.ntfy.app.Application
@@ -82,12 +81,6 @@ class SubscriberServiceManager(private val context: Context) {
const val WORK_NAME_ONCE = "ServiceStartWorkerOnce"
private const val NOTIFICATION_CONNECTION_ALERT_ID = 2587 // Same as SubscriberService
- private fun isNetworkAvailable(context: Context): Boolean {
- val connectivityManager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
- val network = connectivityManager.activeNetwork ?: return false
- val capabilities = connectivityManager.getNetworkCapabilities(network) ?: return false
- return capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
- }
fun refresh(context: Context) {
val manager = SubscriberServiceManager(context)
diff --git a/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt b/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt
index 2ce74222..6083ae70 100644
--- a/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt
+++ b/app/src/main/java/io/heckel/ntfy/ui/MainActivity.kt
@@ -11,8 +11,7 @@ import android.content.Intent
import android.content.pm.PackageManager
import android.net.ConnectivityManager
import android.net.Network
-import android.net.NetworkCapabilities
-import android.net.NetworkRequest
+import io.heckel.ntfy.util.isNetworkAvailable
import android.os.Build
import android.os.Bundle
import android.provider.Settings
@@ -359,10 +358,7 @@ class MainActivity : AppCompatActivity(), AddFragment.SubscribeListener, Notific
runOnUiThread { showHideNoNetworkBanner() }
}
}
- val networkRequest = NetworkRequest.Builder()
- .addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
- .build()
- connectivityManager.registerNetworkCallback(networkRequest, networkCallback!!)
+ connectivityManager.registerDefaultNetworkCallback(networkCallback!!)
// Hide links that lead to payments, see https://github.com/binwiederhier/ntfy/issues/1463
val howToLink = findViewById(R.id.main_how_to_link)
@@ -449,16 +445,8 @@ class MainActivity : AppCompatActivity(), AddFragment.SubscribeListener, Notific
}
private fun showHideNoNetworkBanner() {
- val connectivityManager = getSystemService(CONNECTIVITY_SERVICE) as ConnectivityManager
- val network = connectivityManager.activeNetwork
- val hasNetwork = if (network != null) {
- val capabilities = connectivityManager.getNetworkCapabilities(network)
- capabilities?.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET) == true
- } else {
- false
- }
val banner = findViewById(R.id.main_banner_no_network)
- banner.visibility = if (hasNetwork) View.GONE else View.VISIBLE
+ banner.visibility = if (isNetworkAvailable(this)) View.GONE else View.VISIBLE
}
override fun onDestroy() {
diff --git a/app/src/main/java/io/heckel/ntfy/ui/SettingsActivity.kt b/app/src/main/java/io/heckel/ntfy/ui/SettingsActivity.kt
index ba8c9dc1..3ba01e0d 100644
--- a/app/src/main/java/io/heckel/ntfy/ui/SettingsActivity.kt
+++ b/app/src/main/java/io/heckel/ntfy/ui/SettingsActivity.kt
@@ -328,7 +328,7 @@ class SettingsActivity : AppCompatActivity(), PreferenceFragmentCompat.OnPrefere
}
// Connection alert
- val connectionAlertPrefId = context?.getString(R.string.settings_notifications_connection_alert_key) ?: return
+ val connectionAlertPrefId = context?.getString(R.string.settings_advanced_connection_alert_key) ?: return
val connectionAlert: ListPreference? = findPreference(connectionAlertPrefId)
connectionAlert?.value = repository.getConnectionAlertSeconds().toString()
connectionAlert?.preferenceDataStore = object : PreferenceDataStore() {
@@ -342,14 +342,14 @@ class SettingsActivity : AppCompatActivity(), PreferenceFragmentCompat.OnPrefere
}
connectionAlert?.summaryProvider = Preference.SummaryProvider { pref ->
when (pref.value.toLongOrNull() ?: repository.getConnectionAlertSeconds()) {
- Repository.CONNECTION_ALERT_NEVER -> getString(R.string.settings_notifications_connection_alert_summary_never)
+ Repository.CONNECTION_ALERT_NEVER -> getString(R.string.settings_advanced_connection_alert_summary_never)
30L -> "Alert after 30 seconds (testing)"
- Repository.CONNECTION_ALERT_FIVE_MINUTES -> getString(R.string.settings_notifications_connection_alert_summary_five_minutes)
- Repository.CONNECTION_ALERT_FIFTEEN_MINUTES -> getString(R.string.settings_notifications_connection_alert_summary_fifteen_minutes)
- Repository.CONNECTION_ALERT_ONE_HOUR -> getString(R.string.settings_notifications_connection_alert_summary_one_hour)
- Repository.CONNECTION_ALERT_THREE_HOURS -> getString(R.string.settings_notifications_connection_alert_summary_three_hours)
- Repository.CONNECTION_ALERT_TWELVE_HOURS -> getString(R.string.settings_notifications_connection_alert_summary_twelve_hours)
- else -> getString(R.string.settings_notifications_connection_alert_summary_never) // Must match default const
+ Repository.CONNECTION_ALERT_FIVE_MINUTES -> getString(R.string.settings_advanced_connection_alert_summary_five_minutes)
+ Repository.CONNECTION_ALERT_FIFTEEN_MINUTES -> getString(R.string.settings_advanced_connection_alert_summary_fifteen_minutes)
+ Repository.CONNECTION_ALERT_ONE_HOUR -> getString(R.string.settings_advanced_connection_alert_summary_one_hour)
+ Repository.CONNECTION_ALERT_THREE_HOURS -> getString(R.string.settings_advanced_connection_alert_summary_three_hours)
+ Repository.CONNECTION_ALERT_TWELVE_HOURS -> getString(R.string.settings_advanced_connection_alert_summary_twelve_hours)
+ else -> getString(R.string.settings_advanced_connection_alert_summary_never) // Must match default const
}
}
diff --git a/app/src/main/java/io/heckel/ntfy/util/Util.kt b/app/src/main/java/io/heckel/ntfy/util/Util.kt
index e472fcef..7ef04d84 100644
--- a/app/src/main/java/io/heckel/ntfy/util/Util.kt
+++ b/app/src/main/java/io/heckel/ntfy/util/Util.kt
@@ -10,6 +10,7 @@ import android.content.res.Resources
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.graphics.drawable.RippleDrawable
+import android.net.ConnectivityManager
import android.net.Uri
import android.os.Build
import android.os.PowerManager
@@ -53,6 +54,13 @@ import kotlin.math.abs
import kotlin.math.absoluteValue
import androidx.core.net.toUri
+// We check for any active network, not specifically for internet connectivity,
+// because the ntfy server may be on a LAN without internet access.
+fun isNetworkAvailable(context: Context): Boolean {
+ val connectivityManager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
+ return connectivityManager.activeNetwork != null
+}
+
fun topicUrl(baseUrl: String, topic: String) = "${baseUrl}/${topic}"
fun topicUrlUp(baseUrl: String, topic: String) = "${baseUrl}/${topic}?up=1" // UnifiedPush
fun topicUrlJson(baseUrl: String, topic: String, since: String) = "${topicUrl(baseUrl, topic)}/json?since=$since"
diff --git a/app/src/main/res/drawable/ic_wifi_off_gray_24dp.xml b/app/src/main/res/drawable/ic_wifi_off_gray_24dp.xml
new file mode 100644
index 00000000..9dbc7e1d
--- /dev/null
+++ b/app/src/main/res/drawable/ic_wifi_off_gray_24dp.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 282e2c7a..1642bb78 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -232,21 +232,27 @@
-
+ app:layout_constraintTop_toBottomOf="@id/main_banner_websocket_reconnect">
+
+
Връзката е загубена
От най-малко %2$d минути няма връзка с %1$s
От най-малко %2$d минути няма връзка със сървърите на %1$d
-
+ Отлагане с %1$dч
+ Да не се показва повече
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index dddbc759..71049eed 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -474,5 +474,6 @@
Verbindung verloren
Es konnte länger als %2$d Minuten lang keine Verbindung zu %1$s hergestellt werden
Es konnte länger als %2$d Minuten lang keine Verbindung zu %1$d Servern hergestellt werden
-
+ %1$d Std. schlummern
+ Niemals zeigen
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 78eafc6c..4961a23e 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -413,7 +413,8 @@
Conexión perdida
No se pudo conectar a %1$s por más de %2$d minutos
No se pudo conectar a %1$d servidores por más de %2$d minutos
-
+ Suspender %1$dh
+ Nunca mostrar
Su búsqueda no tuvo ningún resultado
Buscar notificaciones
Buscar en notificaciones
diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml
index c18876c5..c0639a4a 100644
--- a/app/src/main/res/values-et/strings.xml
+++ b/app/src/main/res/values-et/strings.xml
@@ -464,5 +464,6 @@
Ühendus on katkenud
Ühendus %1$s teenusega toimib vaid %2$d minuti(t)
Ühendus %1$d serveriga toimib vaid %2$d minuti(t)
-
+ Tukasta %1$dt
+ Ära näita iialgi
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 22a1fda1..ac32bd0f 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -474,5 +474,6 @@
Connexion perdue
Impossible de se connecter à %1$s depuis plus de %2$d minutes
Impossible de se connecter à %1$d serveurs depuis plus de %2$d minutes
-
+ Sourdine %1$dh
+ Ne jamais montrer
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index d0ecf643..a1c4aeae 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -474,4 +474,6 @@
接続が切断されました
%2$d 分以上 %1$s に接続できませんでした
%1$d 個のサーバーに %2$d 分以上接続できませんでした
+ %1$d時間後に再通知
+ 再表示しない
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index 2ee259f6..eb1ca62e 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -378,7 +378,8 @@
Verbinding verbroken
Kan geen verbinding maken met %1$s voor meer dan %2$d minuten
Kan geen verbinding maken met %1$d servers voor meer dan %2$d minuten
-
+ Sluimer voor %1$d uur
+ Nooit laten zien
Publieer naar %1$s
Uploaden: %1$s (%2$s / %3$s)
Upload geannuleerd
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index 3b72fca0..f8bc7a9d 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -356,8 +356,7 @@
Notificação de alerta de conexão
Não foi possível conectar à %1$s por mais de %2$d minutos
Não foi possível conectar aos servidores %1$d por mais de %2$d minutos
- Dispensar
- Adiar 1h
+ Adiar %1$dh
Nunca mostrar
Erro de conexão
Certificado do servidor não confiável
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 00489ea8..166976ae 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -474,5 +474,6 @@
连接丢失
已无法连接到 %1$s 超过 %2$d 分钟
已无法连接到 %1$d 台服务器超过 %2$d 分钟
-
+ 延后 %1$d 小时
+ 永不显示
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index 920d6956..a5553469 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -474,5 +474,6 @@
連線已中斷
超過 %2$d 分鐘無法連線至 %1$s
超過 %2$d 分鐘無法連線至 %1$d 個伺服器
-
+ 延後 %1$d 小時
+ 永不顯示
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index f2eb6bce..3e7fb3c2 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -52,8 +52,9 @@
Connection lost
Unable to connect to %1$s for more than %2$d minutes. Check your network connection.
Unable to connect to %1$d servers for more than %2$d minutes. Check your network connection.
+
Snooze %1$dh
- Disable alerts
+ Never show
%1$d notification(s) received
@@ -115,7 +116,7 @@
Ask later
Dismiss
Grant now
- No network
+ You\'re offline
Subscribe to topic
@@ -371,19 +372,19 @@
After one week
After one month
After 3 months
- Alert when connection is lost
- Never alert when connection is lost
- Alert after 5 minutes without connection
- Alert after 15 minutes without connection
- Alert after 1 hour without connection
- Alert after 3 hours without connection
- Alert after 12 hours without connection
- Never
- After 5 minutes
- After 15 minutes
- After 1 hour
- After 3 hours
- After 12 hours
+ Connection lost alert
+ Never alert when connection is lost
+ Alert after 5 minutes without connection
+ Alert after 15 minutes without connection
+ Alert after 1 hour without connection
+ Alert after 3 hours without connection
+ Alert after 12 hours without connection
+ Never
+ After 5 minutes
+ After 15 minutes
+ After 1 hour
+ After 3 hours
+ After 12 hours
Keep alerting for highest priority
Max priority notifications continuously alert until dismissed
Max priority notifications only alert once
diff --git a/app/src/main/res/values/values.xml b/app/src/main/res/values/values.xml
index bc1e156e..19c732b1 100644
--- a/app/src/main/res/values/values.xml
+++ b/app/src/main/res/values/values.xml
@@ -47,7 +47,7 @@
SubscriptionMinPriority
SubscriptionAutoDelete
SubscriptionInsistentMaxPriority
- ConnectionAlert
+ ConnectionAlert
SubscriptionAppearance
SubscriptionIconSet
SubscriptionIconRemove
@@ -168,16 +168,16 @@
- 1
- 0
-
- - @string/settings_notifications_connection_alert_never
+
+ - @string/settings_advanced_connection_alert_never
- After 30 seconds (testing)
- - @string/settings_notifications_connection_alert_five_minutes
- - @string/settings_notifications_connection_alert_fifteen_minutes
- - @string/settings_notifications_connection_alert_one_hour
- - @string/settings_notifications_connection_alert_three_hours
- - @string/settings_notifications_connection_alert_twelve_hours
+ - @string/settings_advanced_connection_alert_five_minutes
+ - @string/settings_advanced_connection_alert_fifteen_minutes
+ - @string/settings_advanced_connection_alert_one_hour
+ - @string/settings_advanced_connection_alert_three_hours
+ - @string/settings_advanced_connection_alert_twelve_hours
-
+
- 0
- 30
- 300
diff --git a/app/src/main/res/xml/main_preferences.xml b/app/src/main/res/xml/main_preferences.xml
index dd0dd085..c738b6c3 100644
--- a/app/src/main/res/xml/main_preferences.xml
+++ b/app/src/main/res/xml/main_preferences.xml
@@ -29,12 +29,6 @@
app:key="@string/settings_notifications_insistent_max_priority_key"
app:title="@string/settings_notifications_insistent_max_priority_title"
app:defaultValue="false"/>
-
+