From 4e6c0140dd8d8e2d7f9f3d29c1886ef7ae8fb599 Mon Sep 17 00:00:00 2001 From: geeksville Date: Sat, 15 Aug 2020 12:24:17 -0700 Subject: [PATCH 1/4] 0.9.03 --- app/build.gradle | 8 ++++---- build.gradle | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c50e6d23c..4c6fe493d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -28,8 +28,8 @@ android { applicationId "com.geeksville.mesh" minSdkVersion 21 // The oldest emulator image I have tried is 22 (though 21 probably works) targetSdkVersion 29 - versionCode 10902 // format is Mmmss (where M is 1+the numeric major number - versionName "0.9.02" + versionCode 10903 // format is Mmmss (where M is 1+the numeric major number + versionName "0.9.03" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { @@ -107,13 +107,13 @@ protobuf { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.2.0-rc01' + implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.core:core-ktx:1.3.1' implementation 'androidx.fragment:fragment-ktx:1.2.5' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:2.0.0-rc1' - implementation 'com.google.android.material:material:1.2.0-rc01' + implementation 'com.google.android.material:material:1.2.0' implementation 'androidx.viewpager2:viewpager2:1.0.0' implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0' diff --git a/build.gradle b/build.gradle index bc63d7dbc..ca5347ab8 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ buildscript { ext.kotlin_version = '1.3.72' - ext.coroutines_version = "1.3.5" + ext.coroutines_version = "1.3.9" repositories { google() From 9a73da562c21983ecb127a6de5563a1f5b955781 Mon Sep 17 00:00:00 2001 From: geeksville Date: Tue, 18 Aug 2020 11:25:16 -0700 Subject: [PATCH 2/4] Update to kotlin 1.4 --- .idea/codeStyles/Project.xml | 16 ++++++++++++++++ app/build.gradle | 2 +- .../mesh/service/BluetoothInterface.kt | 8 ++++---- .../com/geeksville/mesh/service/MeshService.kt | 15 +++++++++------ build.gradle | 2 +- 5 files changed, 31 insertions(+), 12 deletions(-) diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index f69257a71..44195e5c1 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -1,6 +1,22 @@ + + diff --git a/app/build.gradle b/app/build.gradle index 4c6fe493d..abf8e9bc0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -122,7 +122,7 @@ dependencies { androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' // kotlin serialization - implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0-M1-1.4.0-rc" // rate this app implementation "com.vorlonsoft:androidrate:1.2.1" diff --git a/app/src/main/java/com/geeksville/mesh/service/BluetoothInterface.kt b/app/src/main/java/com/geeksville/mesh/service/BluetoothInterface.kt index d5582696d..a2abf1634 100644 --- a/app/src/main/java/com/geeksville/mesh/service/BluetoothInterface.kt +++ b/app/src/main/java/com/geeksville/mesh/service/BluetoothInterface.kt @@ -218,20 +218,20 @@ class BluetoothInterface(val service: RadioInterfaceService, val address: String /// Send a packet/command out the radio link - override fun handleSendToRadio(a: ByteArray) { + override fun handleSendToRadio(p: ByteArray) { try { safe?.let { s -> val uuid = BTM_TORADIO_CHARACTER - debug("queuing ${a.size} bytes to $uuid") + debug("queuing ${p.size} bytes to $uuid") // Note: we generate a new characteristic each time, because we are about to // change the data and we want the data stored in the closure val toRadio = getCharacteristic(uuid) - s.asyncWriteCharacteristic(toRadio, a) { r -> + s.asyncWriteCharacteristic(toRadio, p) { r -> try { r.getOrThrow() - debug("write of ${a.size} bytes to $uuid completed") + debug("write of ${p.size} bytes to $uuid completed") if (isFirstSend) { isFirstSend = false diff --git a/app/src/main/java/com/geeksville/mesh/service/MeshService.kt b/app/src/main/java/com/geeksville/mesh/service/MeshService.kt index 3235da7e3..d2e1808fc 100644 --- a/app/src/main/java/com/geeksville/mesh/service/MeshService.kt +++ b/app/src/main/java/com/geeksville/mesh/service/MeshService.kt @@ -36,7 +36,6 @@ import com.google.protobuf.InvalidProtocolBufferException import kotlinx.coroutines.* import kotlinx.serialization.Serializable import kotlinx.serialization.json.Json -import kotlinx.serialization.json.JsonConfiguration import java.util.* import java.util.concurrent.TimeUnit import kotlin.math.absoluteValue @@ -558,8 +557,8 @@ class MeshService : Service(), Logging { nodeDB = nodeDBbyNodeNum.values.toTypedArray(), messages = recentDataPackets.toTypedArray() ) - val json = Json(JsonConfiguration.Default) - val asString = json.stringify(SavedSettings.serializer(), settings) + val json = Json { isLenient = true } + val asString = json.encodeToString(SavedSettings.serializer(), settings) debug("Saving settings") getPrefs().edit(commit = true) { // FIXME, not really ideal to store this bigish blob in preferences @@ -593,8 +592,8 @@ class MeshService : Service(), Logging { try { getPrefs().getString("json", null)?.let { asString -> - val json = Json(JsonConfiguration.Default) - val settings = json.parse(SavedSettings.serializer(), asString) + val json = Json { isLenient = true } + val settings = json.decodeFromString(SavedSettings.serializer(), asString) installNewNodeDB(settings.myInfo, settings.nodeDB) // Note: we do not haveNodeDB = true because that means we've got a valid db from a real device (rather than this possibly stale hint) @@ -866,7 +865,11 @@ class MeshService : Service(), Logging { } /// Update our DB of users based on someone sending out a Position subpacket - private fun handleReceivedPosition(fromNum: Int, p: MeshProtos.Position, defaultTime: Int = Position.currentTime()) { + private fun handleReceivedPosition( + fromNum: Int, + p: MeshProtos.Position, + defaultTime: Int = Position.currentTime() + ) { updateNodeInfo(fromNum) { it.position = Position(p) updateNodeInfoTime(it, defaultTime) diff --git a/build.gradle b/build.gradle index ca5347ab8..70a2cdb51 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.3.72' + ext.kotlin_version = '1.4.0' ext.coroutines_version = "1.3.9" repositories { From a3aaa869e7125ff5bc36c3d9cc379be93418aad4 Mon Sep 17 00:00:00 2001 From: geeksville Date: Tue, 18 Aug 2020 11:34:25 -0700 Subject: [PATCH 3/4] update libs --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index abf8e9bc0..bf41a0447 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -139,13 +139,13 @@ dependencies { // For UART access // implementation 'com.google.android.things:androidthings:1.0' - implementation 'com.github.mik3y:usb-serial-for-android:v2.3.0' + implementation 'com.github.mik3y:usb-serial-for-android:v3.0.0' // mapbox implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.1' // mapbox specifies a really old version of okhttp3 which causes lots of API warnings. trying a newer version - implementation 'com.squareup.okhttp3:okhttp:4.8.0' + implementation 'com.squareup.okhttp3:okhttp:4.8.1' // location services implementation 'com.google.android.gms:play-services-location:17.0.0' From 0c30c4243dc8bef0d49970ad4ac6d8ef7ccffa16 Mon Sep 17 00:00:00 2001 From: geeksville Date: Thu, 20 Aug 2020 19:20:24 -0700 Subject: [PATCH 4/4] 0.9.04 add Haitian translation from @scottbridges --- app/build.gradle | 6 +-- app/src/main/res/values-ht/strings.xml | 71 ++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 app/src/main/res/values-ht/strings.xml diff --git a/app/build.gradle b/app/build.gradle index bf41a0447..c43c61451 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -28,8 +28,8 @@ android { applicationId "com.geeksville.mesh" minSdkVersion 21 // The oldest emulator image I have tried is 22 (though 21 probably works) targetSdkVersion 29 - versionCode 10903 // format is Mmmss (where M is 1+the numeric major number - versionName "0.9.03" + versionCode 10904 // format is Mmmss (where M is 1+the numeric major number + versionName "0.9.04" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { @@ -46,7 +46,7 @@ android { defaultConfig { // We have to list all translated languages here, because some of our libs have bogus languages that google play // doesn't like and we need to strip them (gr) - resConfigs "cs", "de", "el", "en", "es", "fi", "fr", "ga", "it", "ja", "nl", "ru", "sk", "sl", "sq", "sv", "tr", "zh" + resConfigs "cs", "de", "el", "en", "es", "fi", "fr", "ga", "ht", "it", "ja", "nl", "ru", "sk", "sl", "sq", "sv", "tr", "zh" // Needed to make mapbox work inside the firebase testlab - FIXME, alas, still doesn't work ndk { diff --git a/app/src/main/res/values-ht/strings.xml b/app/src/main/res/values-ht/strings.xml new file mode 100644 index 000000000..cc31378aa --- /dev/null +++ b/app/src/main/res/values-ht/strings.xml @@ -0,0 +1,71 @@ + + + Paramèt + Non Chènn + Opsyon Chènn + Bouton pataje + Kòd QR + Pa konfigire + Sitiyasyon koneksyon + ikònn aplikasyon an + Non itilizatè enkoni + Avata itilizatè + Mwen jwenn kachèt la, li bò isit bòkote gwo tig la. Mwen pè. + Voye tèks + Ou ponkò koneke yon radyo ki konpatib avek Meshtastic sou telefòn sa a. Tanpri konekte yon aparèy epi mete non itilizatè w lan.Sa se yon aplikasyon publik ki nan tès Alpha. Si ou gen pwoblèm tanpri afichel sou fowòm nou an: meshtastic.discourse.groupPou plis enfòmasyon gade paj wèb nou an - www.meshtastic.org + Non itilizatè a pa konfigire + Non Ou + Statistik itilizasyon anonim ak rapò aksidantèl. + Ap chache pou aparèy Meshtastic... + Aplikasyon sa a mande pou aksè Bloutouf. Tanpri bay aksè nan paramèt android. + Erè - aplikasyon sa a mande pou Bloutouf + Kòmanse koneksyon + Koneksyon echwe + Yon URL pou rantre nan yon mesh Meshtastic + Aksepte + Anile + Chanje chènn + Èske ou sèten ke ou vle chanje chènn nan? Tout kominikasyon ak lòt ne elektwonik yo ap kanpe jiskaske ou pataje nouvo paramèt chènn yo. + Te resevwa nouvo Chènn URL + Eke ou vle chanje a chènn \'%s\'? + Ou gen analitik ki enfim. Malerezman founisè kat jeyografik nou an (mapbox) mande pou analitik yo pèmèt plan gratis. Se konsa, nou te etènn kat la. Si ou ta renmen wè kat jeyografik la ou pral bezwen ouvri analytics nan Paramèt (si ou enterese pou nou peye pou mapbox (oswa pou nou chanje founisè kat jeyografik la) tanpri poste nan meshtastic.discourse.group + Manke pèmisyon obligatwa, Meshtastic pap ka fonksyone byen. Tanpri ale bay pèmisyon an nan paramèt aplikasyon android. + Radyo t\'ap dòmi, pat ka chanje chènn + Report Bug + Rapòte pwoblèm + Èske ou sèten ou vle rapòte yon pwoblèm? Aprew fin rapòte, tanpri afichel nan meshtastic.discourse.group pou nou ka konpare rapò a ak sa ou jwenn nan. + Rapò + Chwazi radyo + Ou konekte ak radyo %s konya + Ou ponkò konekte ak yon radyo. + Chanje radyo + Tanpri konekte aparèy la nan paramèt android. + Koneksyon konplèt, sèvis kòmanse + Koneksyon echwe, tanpri chwazi ankò + Aksè lokasyon enfim, pa ka bay pozisyon mesh la. + Pataje + Dekonekte + Aparèy ap dòmi + Konekte: %s nan %s disponib + Yon lis ne elektwonik nan rezo a + Mete ajou mikrolojisyèl + Konekte ak radyo + Konekte ak radyo (%s) + Pa konekte, chwazi radyo anba a + Konekte ak radyo, men li ap dòmi + Mizajou %s + Aplikasyon twò ansyen + Ou dwe mete aplikasyon sa ajou sou magazen Google Jwèt. Li twò ansyen poul pale ak radyo sa a. + Okenn (enfim) + Distans kout (men vit) + Distans mwayènn (men vit) + Anpil distans (men pi lan) + Distans vrèman long (men lan) + PA REKONÈT + Notifikasyon Sèvis Meshtastic + Ou dwe ouvri sèvis lokasyon an nan paramèt android + De + Yon lis ne elektronik nan mesh la + Mesaj tèks yo + Chènn URL sa a pa valab epi yo pa kapab itilize li + \ No newline at end of file