diff --git a/.gitignore b/.gitignore
index 176e506..21a12a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
.envrc
.gradle
.idea
+.kotlin
build
debug
local.properties
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8641dea..7258aa0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
## [Unreleased][]
+Replaced timer with broadcast listener for more responsive tile updates.
+
+Added support for direct NFC toggle if granted `WRITE_SECURE_SETTINGS` permission.
+
## [1.3.1][] (2023-12-04)
Enabled code minification and resource shrinkage.
diff --git a/app/build.gradle b/app/build.gradle
index 2fa825e..5030f00 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -60,9 +60,9 @@ base {
}
dependencies {
- implementation 'androidx.core:core-ktx:1.12.0'
- implementation 'androidx.appcompat:appcompat:1.6.1'
- implementation 'com.google.android.material:material:1.11.0'
+ implementation 'androidx.core:core-ktx:1.13.1'
+ implementation 'androidx.appcompat:appcompat:1.7.0'
+ implementation 'com.google.android.material:material:1.12.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 9ef11d5..7c2930f 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -4,6 +4,8 @@
+
+
+
diff --git a/app/src/main/java/au/id/colby/nfcquicksettings/NfcTileService.kt b/app/src/main/java/au/id/colby/nfcquicksettings/NfcTileService.kt
index b6c70f1..6d17acb 100644
--- a/app/src/main/java/au/id/colby/nfcquicksettings/NfcTileService.kt
+++ b/app/src/main/java/au/id/colby/nfcquicksettings/NfcTileService.kt
@@ -3,20 +3,24 @@
package au.id.colby.nfcquicksettings
+import android.Manifest.permission.WRITE_SECURE_SETTINGS
import android.app.PendingIntent
import android.app.PendingIntent.FLAG_IMMUTABLE
+import android.content.BroadcastReceiver
+import android.content.Context
import android.content.Intent
+import android.content.IntentFilter
+import android.content.pm.PackageManager.PERMISSION_GRANTED
import android.nfc.NfcAdapter
-import android.os.Build
import android.os.Build.VERSION.SDK_INT
+import android.os.Build.VERSION_CODES
import android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE
import android.provider.Settings
import android.service.quicksettings.Tile
import android.service.quicksettings.TileService
import android.util.Log
+import androidx.core.content.ContextCompat
import au.id.colby.nfcquicksettings.R.string
-import java.util.Timer
-import kotlin.concurrent.fixedRateTimer
private const val TAG = "NfcTileService"
@@ -27,60 +31,174 @@ private const val TAG = "NfcTileService"
* device's NFC Settings activity.
*/
class NfcTileService : TileService() {
- private var updateTimer: Timer? = null
+ private val nfcBroadcastReceiver = NfcBroadcastReceiver()
/**
* Called when this tile moves into a listening state.
*
- * This override updates the tile's state and title to indicate the device's current NFC status
- * (On, Off, or Unavailable).
+ * This override registers a broadcast receiver to listen for NFC adapter state changes, then
+ * updates the tile according the default adapter's current state.
*/
override fun onStartListening() {
super.onStartListening()
- Log.d(TAG, "onStartListening")
- val adapter: NfcAdapter? = NfcAdapter.getDefaultAdapter(this)
- updateTimer = fixedRateTimer("default", false, 0L, 500) {
- Log.d(TAG, "updateTimer")
- qsTile?.apply {
- Log.d(TAG, "Updating tile")
- state = if (adapter == null) Tile.STATE_INACTIVE else
- if (adapter.isEnabled) Tile.STATE_ACTIVE else Tile.STATE_INACTIVE
- if (SDK_INT >= Build.VERSION_CODES.Q) subtitle = getText(
- if (adapter == null) string.tile_subtitle_unavailable else
- if (adapter.isEnabled) string.tile_subtitle_active else string.tile_subtitle_inactive
- )
- updateTile()
- }
- }
+ Log.d(TAG, "onStartListening; Registering broadcast receiver")
+ ContextCompat.registerReceiver(
+ this,
+ nfcBroadcastReceiver,
+ IntentFilter(NfcAdapter.ACTION_ADAPTER_STATE_CHANGED),
+ ContextCompat.RECEIVER_EXPORTED
+ )
+ updateTile()
}
/**
* Called when this tile moves out of the listening state.
*
- * This override cancels the update timer, if any is running.
+ * This override simply unregisters the broadcast receiver.
*/
override fun onStopListening() {
- Log.d(TAG, "onStopListening")
- updateTimer?.apply {
- Log.d(TAG, "Cancelling update timer")
- cancel()
- }
+ Log.d(TAG, "onStopListening; Unregistering broadcast receiver")
+ unregisterReceiver(nfcBroadcastReceiver)
super.onStopListening()
}
/**
* Called when the user clicks on this tile.
*
- * This override takes the user to the NFC settings, by starting the `ACTION_NFC_SETTINGS`
- * activity, and collapsing the Quick Settings menu.
+ * This override attempts to invert the default NFC adapter's state, and if that cannot be done,
+ * launches the NFC Settings Action, where the user can toggle it themselves.
*/
override fun onClick() {
super.onClick()
Log.d(TAG, "onClick")
+ if (!invertNfcState()) startNfcSettingsActivity()
+ }
+
+ /**
+ * Inverts the NFC [adapter]'s current state.
+ *
+ * That is, if [adapter] is currently enabled, then disable it, and vice versa. This calls
+ * [setNfcAdapterState], which in turn, requires WRITE_SECURE_SETTINGS permission.
+ *
+ * @return true if the [adapter]'s new state was successfully requested.
+ */
+ private fun invertNfcState(adapter: NfcAdapter? = NfcAdapter.getDefaultAdapter(this)): Boolean {
+ return adapter?.run { setNfcAdapterState(this, !isEnabled) } ?: false
+ }
+
+ /**
+ * Checks if [permission] has been granted to us.
+ *
+ * @return true if we have [permission], otherwise false.
+ */
+ private fun permissionGranted(permission: String): Boolean {
+ val status = checkSelfPermission(permission)
+ Log.d(TAG, "$permission status: $status")
+ return status == PERMISSION_GRANTED
+ }
+
+ /**
+ * Sets the [adapter] state to [enable].
+ *
+ * This uses introspection to execute either the NfcAdapter::enable() or NfcAdapter::disable()
+ * function as appropriate. These functions both require WRITE_SECURE_SETTINGS permission.
+ *
+ * @return true if the state change was successfully requested, otherwise false.
+ */
+ private fun setNfcAdapterState(adapter: NfcAdapter, enable: Boolean): Boolean {
+ if (!permissionGranted(WRITE_SECURE_SETTINGS)) return false
+ val methodName = if (enable) "enable" else "disable"
+ Log.i(TAG, "Setting NFC adapter's status to ${methodName}d")
+ if (enable) updateTile(Tile.STATE_ACTIVE, string.tile_subtitle_turning_on)
+ val success = try {
+ Log.d(TAG, "Invoking NfcAdapter::$methodName()")
+ val result = NfcAdapter::class.java.getMethod(methodName).invoke(adapter)
+ Log.d(TAG, "NfcAdapter::$methodName() returned $result")
+ result is Boolean && result
+ } catch (e: Exception) {
+ Log.e(TAG, "Failed to invoke NfcAdapter::$methodName()", e)
+ false
+ }
+ if (enable && !success) updateTile() // Clear the 'Turning on...' state.
+ if (!enable && success) updateTile(false) // Show the tile as inactive already.
+ return success
+ }
+
+ /**
+ * Starts the NFC Settings activity, then collapses the Quick Settings panel behind it.
+ */
+ private fun startNfcSettingsActivity() {
+ Log.i(TAG, "Starting the ACTION_NFC_SETTINGS activity")
val intent = Intent(Settings.ACTION_NFC_SETTINGS)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
//noinspection StartActivityAndCollapseDeprecated
if (SDK_INT < UPSIDE_DOWN_CAKE) @Suppress("DEPRECATION") startActivityAndCollapse(intent)
else startActivityAndCollapse(PendingIntent.getActivity(this, 0, intent, FLAG_IMMUTABLE))
}
+
+ /**
+ * Updates the Quick Settings tile with the [newState] and (if supported) [newSubTitleResId].
+ *
+ * Note [newSubTitleResId] will be ignored on devices running Android versions earlier than Q.
+ *
+ * @param newState The next state for the tile. Should be one of the Tile.STATE_* constants.
+ * @param newSubTitleResId Resource ID for the new subtitle text.
+ */
+ private fun updateTile(newState: Int, newSubTitleResId: Int) {
+ qsTile?.apply {
+ Log.d(TAG, "Updating tile with state $newState")
+ this.state = newState
+ if (SDK_INT >= VERSION_CODES.Q) this.subtitle = getText(newSubTitleResId)
+ updateTile()
+ }
+ }
+
+ /**
+ * Updates the Quick Settings tile to show as active or not.
+ *
+ * @param active If true show the tile as active, otherwise show as inactive.
+ */
+ private fun updateTile(active: Boolean) {
+ if (active) updateTile(Tile.STATE_ACTIVE, string.tile_subtitle_active)
+ else updateTile(Tile.STATE_INACTIVE, string.tile_subtitle_inactive)
+ }
+
+ /**
+ * Updates the Quick Settings tile to reflect the [adapter]'s current state.
+ *
+ * @param adapter The adapter to reflect the state of.
+ */
+ private fun updateTile(adapter: NfcAdapter? = NfcAdapter.getDefaultAdapter(this)) {
+ adapter?.apply { updateTile(isEnabled) } ?:
+ updateTile(Tile.STATE_INACTIVE, string.tile_subtitle_unavailable)
+ }
+
+ /**
+ * Provides static functions for the NfcTileService class.
+ */
+ companion object {
+ /**
+ * Updates the Quick Settings tile owned by [context], which is an NfcTileService instance.
+ */
+ fun updateTile(context: Context) {
+ (context as? NfcTileService)?.run { updateTile(); }
+ }
+ }
+
+ /**
+ * A custom Broadcast Receiver for updating an NfcTileService on NFC adapter state changes.
+ */
+ inner class NfcBroadcastReceiver : BroadcastReceiver() {
+ /**
+ * Called when a broadcast message is received.
+ *
+ * This override simply reflects the event back to the [context] for which it the
+ * receiver was registered.
+ */
+ override fun onReceive(context: Context, intent: Intent) {
+ Log.d(TAG, "onReceive $context $intent")
+ if (intent.action == NfcAdapter.ACTION_ADAPTER_STATE_CHANGED) updateTile(context)
+ else Log.w(TAG, "Received unexpected broadcast message: $intent")
+ }
+ }
}
diff --git a/app/src/main/res/values-af/strings.xml b/app/src/main/res/values-af/strings.xml
index 7903e2e..86cd3cd 100644
--- a/app/src/main/res/values-af/strings.xml
+++ b/app/src/main/res/values-af/strings.xml
@@ -2,5 +2,6 @@
Aan
Af
+ Skakel tans aan …
Onbeskikbaar
diff --git a/app/src/main/res/values-am/strings.xml b/app/src/main/res/values-am/strings.xml
index d399512..a89e16d 100644
--- a/app/src/main/res/values-am/strings.xml
+++ b/app/src/main/res/values-am/strings.xml
@@ -2,5 +2,6 @@
በርቷል
ጠፍቷል
+ በማብራት ላይ...
አይገኝም
diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml
index 32a0a3a..aeb27ab 100644
--- a/app/src/main/res/values-ar/strings.xml
+++ b/app/src/main/res/values-ar/strings.xml
@@ -2,5 +2,6 @@
الميزة مفعّلة
الميزة غير مفعّلة
+ جارٍ التفعيل…
الميزة غير متاحة
diff --git a/app/src/main/res/values-as/strings.xml b/app/src/main/res/values-as/strings.xml
index 445f7fd..3cce7bb 100644
--- a/app/src/main/res/values-as/strings.xml
+++ b/app/src/main/res/values-as/strings.xml
@@ -2,5 +2,6 @@
অন কৰা আছে
অফ আছে
+ অন কৰি থকা হৈছে…
উপলব্ধ নহয়
diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml
index 9f5252b..7adbd1b 100644
--- a/app/src/main/res/values-az/strings.xml
+++ b/app/src/main/res/values-az/strings.xml
@@ -2,5 +2,6 @@
Aktiv
Deaktiv
+ Aktiv edilir...
Əlçatan deyil
diff --git a/app/src/main/res/values-b+sr+Latn/strings.xml b/app/src/main/res/values-b+sr+Latn/strings.xml
index f9f9659..877ee51 100644
--- a/app/src/main/res/values-b+sr+Latn/strings.xml
+++ b/app/src/main/res/values-b+sr+Latn/strings.xml
@@ -2,5 +2,6 @@
Uključeno
Isključeno
+ Uključuje se...
Nedostupno
diff --git a/app/src/main/res/values-be/strings.xml b/app/src/main/res/values-be/strings.xml
index f9533ef..a690ee4 100644
--- a/app/src/main/res/values-be/strings.xml
+++ b/app/src/main/res/values-be/strings.xml
@@ -2,5 +2,6 @@
Уключана
Выключана
+ Уключэнне…
Недаступна
diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml
index ac565e2..5cdbe20 100644
--- a/app/src/main/res/values-bg/strings.xml
+++ b/app/src/main/res/values-bg/strings.xml
@@ -2,5 +2,6 @@
Вкл.
Изкл.
+ Включва се...
Не е налице
diff --git a/app/src/main/res/values-bn/strings.xml b/app/src/main/res/values-bn/strings.xml
index d711630..f86e661 100644
--- a/app/src/main/res/values-bn/strings.xml
+++ b/app/src/main/res/values-bn/strings.xml
@@ -2,5 +2,6 @@
চালু আছে
বন্ধ আছে
+ চালু করা হচ্ছে…
উপলভ্য নেই
diff --git a/app/src/main/res/values-bs/strings.xml b/app/src/main/res/values-bs/strings.xml
index f9f9659..0230da1 100644
--- a/app/src/main/res/values-bs/strings.xml
+++ b/app/src/main/res/values-bs/strings.xml
@@ -2,5 +2,6 @@
Uključeno
Isključeno
+ Uključivanje…
Nedostupno
diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml
index 8f73b26..658ac6d 100644
--- a/app/src/main/res/values-ca/strings.xml
+++ b/app/src/main/res/values-ca/strings.xml
@@ -2,5 +2,6 @@
Activat
Desactivat
+ S\'està activant…
No disponible
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
index c4a61bd..239b42e 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -2,5 +2,6 @@
Zapnuto
Vypnuto
+ Zapínání…
Nedostupné
diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml
index 1400464..6142261 100644
--- a/app/src/main/res/values-da/strings.xml
+++ b/app/src/main/res/values-da/strings.xml
@@ -2,5 +2,6 @@
Til
Fra
+ Aktiverer…
Ikke tilgængelig
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 3e8c565..562516c 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -2,5 +2,6 @@
An
Aus
+ Wird aktiviert…
Nicht verfügbar
diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml
index 473bdb0..acec2df 100644
--- a/app/src/main/res/values-el/strings.xml
+++ b/app/src/main/res/values-el/strings.xml
@@ -2,5 +2,6 @@
Ενεργό
Ανενεργό
+ Ενεργοποίηση…
Μη διαθέσιμο
diff --git a/app/src/main/res/values-en-rAU/strings.xml b/app/src/main/res/values-en-rAU/strings.xml
index f4a4ac0..66f4a99 100644
--- a/app/src/main/res/values-en-rAU/strings.xml
+++ b/app/src/main/res/values-en-rAU/strings.xml
@@ -2,5 +2,6 @@
On
Off
+ Turning on…
Unavailable
diff --git a/app/src/main/res/values-en-rCA/strings.xml b/app/src/main/res/values-en-rCA/strings.xml
index f4a4ac0..66f4a99 100644
--- a/app/src/main/res/values-en-rCA/strings.xml
+++ b/app/src/main/res/values-en-rCA/strings.xml
@@ -2,5 +2,6 @@
On
Off
+ Turning on…
Unavailable
diff --git a/app/src/main/res/values-en-rGB/strings.xml b/app/src/main/res/values-en-rGB/strings.xml
index f4a4ac0..66f4a99 100644
--- a/app/src/main/res/values-en-rGB/strings.xml
+++ b/app/src/main/res/values-en-rGB/strings.xml
@@ -2,5 +2,6 @@
On
Off
+ Turning on…
Unavailable
diff --git a/app/src/main/res/values-en-rIN/strings.xml b/app/src/main/res/values-en-rIN/strings.xml
index f4a4ac0..66f4a99 100644
--- a/app/src/main/res/values-en-rIN/strings.xml
+++ b/app/src/main/res/values-en-rIN/strings.xml
@@ -2,5 +2,6 @@
On
Off
+ Turning on…
Unavailable
diff --git a/app/src/main/res/values-en-rXC/strings.xml b/app/src/main/res/values-en-rXC/strings.xml
index 441ebc9..2953648 100644
--- a/app/src/main/res/values-en-rXC/strings.xml
+++ b/app/src/main/res/values-en-rXC/strings.xml
@@ -2,5 +2,6 @@
On
Off
+ Turning on…
Unavailable
diff --git a/app/src/main/res/values-es-rUS/strings.xml b/app/src/main/res/values-es-rUS/strings.xml
index 8d1743b..9f841d4 100644
--- a/app/src/main/res/values-es-rUS/strings.xml
+++ b/app/src/main/res/values-es-rUS/strings.xml
@@ -2,5 +2,6 @@
Activado
Desactivado
+ Activando…
No disponible
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 8d1743b..9f841d4 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -2,5 +2,6 @@
Activado
Desactivado
+ Activando…
No disponible
diff --git a/app/src/main/res/values-et/strings.xml b/app/src/main/res/values-et/strings.xml
index a3c82a7..21b61fc 100644
--- a/app/src/main/res/values-et/strings.xml
+++ b/app/src/main/res/values-et/strings.xml
@@ -2,5 +2,6 @@
Sees
Väljas
+ Sisselülitamine …
Pole saadaval
diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml
index e2258b9..f4d5c40 100644
--- a/app/src/main/res/values-eu/strings.xml
+++ b/app/src/main/res/values-eu/strings.xml
@@ -2,5 +2,6 @@
Aktibatuta
Desaktibatuta
+ Aktibatzen…
Ez dago erabilgarri
diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml
index 08487fb..7c0d739 100644
--- a/app/src/main/res/values-fa/strings.xml
+++ b/app/src/main/res/values-fa/strings.xml
@@ -2,5 +2,6 @@
روشن
خاموش
+ روشن کردن…
دردسترس نیست
diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml
index c51817a..a712eec 100644
--- a/app/src/main/res/values-fi/strings.xml
+++ b/app/src/main/res/values-fi/strings.xml
@@ -2,5 +2,6 @@
Päällä
Poissa päältä
+ Otetaan käyttöön…
Ei saatavilla
diff --git a/app/src/main/res/values-fr-rCA/strings.xml b/app/src/main/res/values-fr-rCA/strings.xml
index 22ffc5f..2816908 100644
--- a/app/src/main/res/values-fr-rCA/strings.xml
+++ b/app/src/main/res/values-fr-rCA/strings.xml
@@ -2,5 +2,6 @@
Activé
Désactivé
+ Activation en cours…
Non disponible
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index f9a414c..e3c8c1e 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -2,5 +2,6 @@
Activé
Désactivé
+ Activation…
Indisponible
diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml
index 1aaed84..4bfa64b 100644
--- a/app/src/main/res/values-gl/strings.xml
+++ b/app/src/main/res/values-gl/strings.xml
@@ -2,5 +2,6 @@
Si
Non
+ Activando…
Non dispoñible
diff --git a/app/src/main/res/values-gu/strings.xml b/app/src/main/res/values-gu/strings.xml
index 8bf047a..78c27b5 100644
--- a/app/src/main/res/values-gu/strings.xml
+++ b/app/src/main/res/values-gu/strings.xml
@@ -2,5 +2,6 @@
ચાલુ છે
બંધ છે
+ ચાલુ કરી રહ્યાં છીએ…
ઉપલબ્ધ નથી
diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml
index 1318cc9..ca3a1cf 100644
--- a/app/src/main/res/values-hi/strings.xml
+++ b/app/src/main/res/values-hi/strings.xml
@@ -2,5 +2,6 @@
चालू है
बंद है
+ वाई-फ़ाई चालू हो रहा है…
उपलब्ध नहीं है
diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml
index f9f9659..0230da1 100644
--- a/app/src/main/res/values-hr/strings.xml
+++ b/app/src/main/res/values-hr/strings.xml
@@ -2,5 +2,6 @@
Uključeno
Isključeno
+ Uključivanje…
Nedostupno
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 764427e..9e2ed6e 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -2,5 +2,6 @@
Be
Ki
+ Bekapcsolás…
Nem áll rendelkezésre
diff --git a/app/src/main/res/values-hy/strings.xml b/app/src/main/res/values-hy/strings.xml
index 19c6c40..0e14ce0 100644
--- a/app/src/main/res/values-hy/strings.xml
+++ b/app/src/main/res/values-hy/strings.xml
@@ -2,5 +2,6 @@
Միացված է
Անջատված է
+ Միացում…
Հասանելի չէ
diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml
index f4272f0..ebbf18b 100644
--- a/app/src/main/res/values-in/strings.xml
+++ b/app/src/main/res/values-in/strings.xml
@@ -2,5 +2,6 @@
Aktif
Nonaktif
+ Mengaktifkan…
Tidak tersedia
diff --git a/app/src/main/res/values-is/strings.xml b/app/src/main/res/values-is/strings.xml
index 7ff4da2..8209d6e 100644
--- a/app/src/main/res/values-is/strings.xml
+++ b/app/src/main/res/values-is/strings.xml
@@ -2,5 +2,6 @@
Kveikt
Slökkt
+ Kveikir…
Ekki í boði
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index c7bf94e..d092151 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -2,5 +2,6 @@
On
Off
+ Attivazione…
Non disponibile
diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml
index b7edd23..ad0aaad 100644
--- a/app/src/main/res/values-iw/strings.xml
+++ b/app/src/main/res/values-iw/strings.xml
@@ -2,5 +2,6 @@
פועל
כבוי
+ בתהליך הפעלה…
לא זמין
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index 9c36049..ff38c1a 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -2,5 +2,6 @@
ON
OFF
+ ON にしています…
使用不可
diff --git a/app/src/main/res/values-ka/strings.xml b/app/src/main/res/values-ka/strings.xml
index df3a0e7..dbc4b4b 100644
--- a/app/src/main/res/values-ka/strings.xml
+++ b/app/src/main/res/values-ka/strings.xml
@@ -2,5 +2,6 @@
ჩართულია
გამორთულია
+ ირთვება…
მიუწვდომელია
diff --git a/app/src/main/res/values-kk/strings.xml b/app/src/main/res/values-kk/strings.xml
index efc03e9..1e768ae 100644
--- a/app/src/main/res/values-kk/strings.xml
+++ b/app/src/main/res/values-kk/strings.xml
@@ -2,5 +2,6 @@
Қосулы
Өшірулі
+ Қосылуда…
Қолжетімсіз
diff --git a/app/src/main/res/values-km/strings.xml b/app/src/main/res/values-km/strings.xml
index 4bbc664..5a445c5 100644
--- a/app/src/main/res/values-km/strings.xml
+++ b/app/src/main/res/values-km/strings.xml
@@ -2,5 +2,6 @@
បើក
បិទ
+ កំពុងបើក...
មិនមានទេ
diff --git a/app/src/main/res/values-kn/strings.xml b/app/src/main/res/values-kn/strings.xml
index 9b8cb6a..7df7c45 100644
--- a/app/src/main/res/values-kn/strings.xml
+++ b/app/src/main/res/values-kn/strings.xml
@@ -2,5 +2,6 @@
ಆನ್ ಮಾಡಿ
ಆಫ್ ಮಾಡಿ
+ ಆನ್ ಮಾಡಲಾಗುತ್ತಿದೆ...
ಲಭ್ಯವಿಲ್ಲ
diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml
index 91b0721..45f6a4b 100644
--- a/app/src/main/res/values-ko/strings.xml
+++ b/app/src/main/res/values-ko/strings.xml
@@ -2,5 +2,6 @@
켜짐
꺼짐
+ 켜는 중...
이용 불가
diff --git a/app/src/main/res/values-ky/strings.xml b/app/src/main/res/values-ky/strings.xml
index 9904270..42a7087 100644
--- a/app/src/main/res/values-ky/strings.xml
+++ b/app/src/main/res/values-ky/strings.xml
@@ -2,5 +2,6 @@
Күйүк
Өчүк
+ Күйгүзүлүүдө…
Жеткиликсиз
diff --git a/app/src/main/res/values-lo/strings.xml b/app/src/main/res/values-lo/strings.xml
index 9754a81..6a676e6 100644
--- a/app/src/main/res/values-lo/strings.xml
+++ b/app/src/main/res/values-lo/strings.xml
@@ -2,5 +2,6 @@
ເປີດ
ປິດ
+ ກຳລັງເປີດ...
ບໍ່ສາມາດໃຊ້ໄດ້
diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml
index a5046f7..7b46261 100644
--- a/app/src/main/res/values-lt/strings.xml
+++ b/app/src/main/res/values-lt/strings.xml
@@ -2,5 +2,6 @@
Įjungta
Išjungta
+ Įjungiama…
Nepasiekiama
diff --git a/app/src/main/res/values-lv/strings.xml b/app/src/main/res/values-lv/strings.xml
index 81c15a9..a0f284a 100644
--- a/app/src/main/res/values-lv/strings.xml
+++ b/app/src/main/res/values-lv/strings.xml
@@ -2,5 +2,6 @@
Ieslēgts
Izslēgts
+ Notiek ieslēgšana…
Nav pieejams
diff --git a/app/src/main/res/values-mk/strings.xml b/app/src/main/res/values-mk/strings.xml
index e73935d..c4e4ea8 100644
--- a/app/src/main/res/values-mk/strings.xml
+++ b/app/src/main/res/values-mk/strings.xml
@@ -2,5 +2,6 @@
Вклучено
Исклучено
+ Се вклучува…
Недостапно
diff --git a/app/src/main/res/values-ml/strings.xml b/app/src/main/res/values-ml/strings.xml
index da009eb..63a898d 100644
--- a/app/src/main/res/values-ml/strings.xml
+++ b/app/src/main/res/values-ml/strings.xml
@@ -2,5 +2,6 @@
ഓണാണ്
ഓഫാണ്
+ ഓണാക്കുന്നു…
ലഭ്യമല്ല
diff --git a/app/src/main/res/values-mn/strings.xml b/app/src/main/res/values-mn/strings.xml
index 9d2fd56..fc615c3 100644
--- a/app/src/main/res/values-mn/strings.xml
+++ b/app/src/main/res/values-mn/strings.xml
@@ -2,5 +2,6 @@
Асаалттай
Унтраалттай
+ Асааж байна…
Боломжгүй
diff --git a/app/src/main/res/values-mr/strings.xml b/app/src/main/res/values-mr/strings.xml
index 749e7be..05d5b53 100644
--- a/app/src/main/res/values-mr/strings.xml
+++ b/app/src/main/res/values-mr/strings.xml
@@ -2,5 +2,6 @@
सुरू आहे
बंद आहे
+ सुरू करत आहे…
उपलब्ध नाही
diff --git a/app/src/main/res/values-ms/strings.xml b/app/src/main/res/values-ms/strings.xml
index 8c1d882..a3f54dd 100644
--- a/app/src/main/res/values-ms/strings.xml
+++ b/app/src/main/res/values-ms/strings.xml
@@ -2,5 +2,6 @@
Hidup
Mati
+ Menghidupkan…
Tidak tersedia
diff --git a/app/src/main/res/values-my/strings.xml b/app/src/main/res/values-my/strings.xml
index 1957fd5..aa5d739 100644
--- a/app/src/main/res/values-my/strings.xml
+++ b/app/src/main/res/values-my/strings.xml
@@ -2,5 +2,6 @@
ဖွင့်
ပိတ်
+ ဖွင့်နေသည်…
မရနိုင်ပါ
diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml
index 9545ad1..cfb11d0 100644
--- a/app/src/main/res/values-nb/strings.xml
+++ b/app/src/main/res/values-nb/strings.xml
@@ -2,5 +2,6 @@
På
Av
+ Slår på …
Utilgjengelig
diff --git a/app/src/main/res/values-ne/strings.xml b/app/src/main/res/values-ne/strings.xml
index 1764ed4..6bb71a6 100644
--- a/app/src/main/res/values-ne/strings.xml
+++ b/app/src/main/res/values-ne/strings.xml
@@ -2,5 +2,6 @@
अन छ
अफ छ
+ सक्रिय गर्दै…
उपलब्ध छैन
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index b6ba887..e8dc60b 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -2,5 +2,6 @@
Aan
Uit
+ Aanzetten…
Niet beschikbaar
diff --git a/app/src/main/res/values-or/strings.xml b/app/src/main/res/values-or/strings.xml
index 253ab01..43761ef 100644
--- a/app/src/main/res/values-or/strings.xml
+++ b/app/src/main/res/values-or/strings.xml
@@ -2,5 +2,6 @@
ଚାଲୁ ଅଛି
ବନ୍ଦ ଅଛି
+ ଅନ୍ ହେଉଛି…
ଉପଲବ୍ଧ ନାହିଁ
diff --git a/app/src/main/res/values-pa/strings.xml b/app/src/main/res/values-pa/strings.xml
index 16f275e..a5a94b1 100644
--- a/app/src/main/res/values-pa/strings.xml
+++ b/app/src/main/res/values-pa/strings.xml
@@ -2,5 +2,6 @@
ਚਾਲੂ ਹੈ
ਬੰਦ ਹੈ
+ ਚਾਲੂ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ…
ਅਣਉਪਲਬਧ ਹੈ
diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml
index 080e419..fe34c0b 100644
--- a/app/src/main/res/values-pl/strings.xml
+++ b/app/src/main/res/values-pl/strings.xml
@@ -2,5 +2,6 @@
Włączony
Wyłączony
+ Włączam…
Niedostępny
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index 2c56b41..cebdf0a 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -2,5 +2,6 @@
Ativado
Desativado
+ Ativando…
Indisponível
diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml
index 499e1f6..3019232 100644
--- a/app/src/main/res/values-pt-rPT/strings.xml
+++ b/app/src/main/res/values-pt-rPT/strings.xml
@@ -2,5 +2,6 @@
Ligado
Desligado
+ A ativar...
Indisponível
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 2c56b41..cebdf0a 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -2,5 +2,6 @@
Ativado
Desativado
+ Ativando…
Indisponível
diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml
index c14d82f..93a4f19 100644
--- a/app/src/main/res/values-ro/strings.xml
+++ b/app/src/main/res/values-ro/strings.xml
@@ -2,5 +2,6 @@
Activat
Dezactivat
+ Se activează...
Indisponibil
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index d263c65..8d451b2 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -2,5 +2,6 @@
Вкл.
Откл.
+ Включение…
Функция недоступна
diff --git a/app/src/main/res/values-si/strings.xml b/app/src/main/res/values-si/strings.xml
index 8927959..7b9e33c 100644
--- a/app/src/main/res/values-si/strings.xml
+++ b/app/src/main/res/values-si/strings.xml
@@ -2,5 +2,6 @@
සක්රියයි
අක්රියයි
+ ක්රියාත්මක කරමින්…
නොමැත
diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml
index 7143d42..da7e5c2 100644
--- a/app/src/main/res/values-sk/strings.xml
+++ b/app/src/main/res/values-sk/strings.xml
@@ -2,5 +2,6 @@
Zapnuté
Vypnuté
+ Zapína sa…
Nie je k dispozícii
diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml
index 3371cc0..8eacc55 100644
--- a/app/src/main/res/values-sl/strings.xml
+++ b/app/src/main/res/values-sl/strings.xml
@@ -2,5 +2,6 @@
Vklopljeno
Izklopljeno
+ Vklapljanje …
Ni na voljo
diff --git a/app/src/main/res/values-sq/strings.xml b/app/src/main/res/values-sq/strings.xml
index 964f86a..5ec9b5e 100644
--- a/app/src/main/res/values-sq/strings.xml
+++ b/app/src/main/res/values-sq/strings.xml
@@ -2,5 +2,6 @@
Aktiv
Joaktiv
+ Po aktivizohet…
Nuk ofrohet
diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml
index a5e52e1..1c804d7 100644
--- a/app/src/main/res/values-sr/strings.xml
+++ b/app/src/main/res/values-sr/strings.xml
@@ -2,5 +2,6 @@
Укључено
Искључено
+ Укључује се...
Недоступно
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index 3ed3f39..f259417 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -2,5 +2,6 @@
På
Av
+ Aktiverar …
Inte tillgängligt
diff --git a/app/src/main/res/values-sw/strings.xml b/app/src/main/res/values-sw/strings.xml
index 0799957..cd251ea 100644
--- a/app/src/main/res/values-sw/strings.xml
+++ b/app/src/main/res/values-sw/strings.xml
@@ -2,5 +2,6 @@
Kimewashwa
Kimezimwa
+ Inawasha...
Hakipatikani
diff --git a/app/src/main/res/values-ta/strings.xml b/app/src/main/res/values-ta/strings.xml
index 9839e6f..5fd5a4d 100644
--- a/app/src/main/res/values-ta/strings.xml
+++ b/app/src/main/res/values-ta/strings.xml
@@ -2,5 +2,6 @@
இயக்கப்பட்டுள்ளது
முடக்கப்பட்டுள்ளது
+ ஆன் செய்கிறது…
கிடைக்கவில்லை
diff --git a/app/src/main/res/values-te/strings.xml b/app/src/main/res/values-te/strings.xml
index 1f35c8f..83846ff 100644
--- a/app/src/main/res/values-te/strings.xml
+++ b/app/src/main/res/values-te/strings.xml
@@ -2,5 +2,6 @@
ఆన్లో ఉంది
ఆఫ్లో ఉంది
+ ఆన్ చేస్తోంది…
అందుబాటులో లేదు
diff --git a/app/src/main/res/values-th/strings.xml b/app/src/main/res/values-th/strings.xml
index 22899ac..bd36a80 100644
--- a/app/src/main/res/values-th/strings.xml
+++ b/app/src/main/res/values-th/strings.xml
@@ -2,5 +2,6 @@
เปิด
ปิด
+ กำลังเปิด...
ไม่พร้อมใช้งาน
diff --git a/app/src/main/res/values-tl/strings.xml b/app/src/main/res/values-tl/strings.xml
index ec8b9ad..c3c5df9 100644
--- a/app/src/main/res/values-tl/strings.xml
+++ b/app/src/main/res/values-tl/strings.xml
@@ -2,5 +2,6 @@
Naka-on
Naka-off
+ Ino-on…
Hindi available
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index 262ccbc..2a6831e 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -2,5 +2,6 @@
Açık
Kapalı
+ Açılıyor…
Kullanılamıyor
diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml
index 034f6e5..1a49eb2 100644
--- a/app/src/main/res/values-uk/strings.xml
+++ b/app/src/main/res/values-uk/strings.xml
@@ -2,5 +2,6 @@
Увімкнено
Вимкнено
+ Увімкнення…
Недоступно
diff --git a/app/src/main/res/values-ur/strings.xml b/app/src/main/res/values-ur/strings.xml
index 3b26df4..1ac3208 100644
--- a/app/src/main/res/values-ur/strings.xml
+++ b/app/src/main/res/values-ur/strings.xml
@@ -2,5 +2,6 @@
آن ہے
آف ہے
+ آن ہو رہا ہے…
دستیاب نہیں ہے
diff --git a/app/src/main/res/values-uz/strings.xml b/app/src/main/res/values-uz/strings.xml
index cdcbc3a..9c5d639 100644
--- a/app/src/main/res/values-uz/strings.xml
+++ b/app/src/main/res/values-uz/strings.xml
@@ -2,5 +2,6 @@
Yoniq
Oʻchiq
+ Yoqilmoqda…
Ishlamaydi
diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml
index c8f9155..6599412 100644
--- a/app/src/main/res/values-vi/strings.xml
+++ b/app/src/main/res/values-vi/strings.xml
@@ -2,5 +2,6 @@
Đang bật
Đang tắt
+ Đang bật…
Không hoạt động
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 578dab0..2fc7c5b 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -2,5 +2,6 @@
已开启
已关闭
+ 正在开启…
不可用
diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml
index 1c33d67..5f9b62e 100644
--- a/app/src/main/res/values-zh-rHK/strings.xml
+++ b/app/src/main/res/values-zh-rHK/strings.xml
@@ -2,5 +2,6 @@
已開啟
已關閉
+ 正在開啟…
無法使用
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index 1c33d67..2b095fa 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -2,5 +2,6 @@
已開啟
已關閉
+ 開啟中…
無法使用
diff --git a/app/src/main/res/values-zu/strings.xml b/app/src/main/res/values-zu/strings.xml
index 3ca259e..4a2ddd1 100644
--- a/app/src/main/res/values-zu/strings.xml
+++ b/app/src/main/res/values-zu/strings.xml
@@ -2,5 +2,6 @@
Vuliwe
Valiwe
+ Iyavula...
Akutholakali
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 6144648..4c7173c 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -3,5 +3,6 @@
NFC
On
Off
+ Turning on…
Unavailable
diff --git a/build.gradle b/build.gradle
index 6f4831a..e770692 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,8 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
- id 'com.android.application' version '8.3.0' apply false
- id 'com.android.library' version '8.3.0' apply false
+ id 'com.android.application' version '8.5.0' apply false
+ id 'com.android.library' version '8.5.0' apply false
id 'com.github.ben-manes.versions' version '0.51.0'
- id 'org.jetbrains.dokka' version '1.9.10' apply false
- id 'org.jetbrains.kotlin.android' version '1.9.22' apply false
+ id 'org.jetbrains.dokka' version '1.9.20' apply false
+ id 'org.jetbrains.kotlin.android' version '2.0.0' apply false
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index a80b22c..a441313 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME