From f18afc95d2b2b730eb57f94cd4269ac7fd815e4d Mon Sep 17 00:00:00 2001 From: geeksville Date: Tue, 4 Feb 2020 21:23:52 -0800 Subject: [PATCH] don't kill app it test packets fail --- TODO.md | 5 +++ .../java/com/geeksville/mesh/MainActivity.kt | 31 ++++++++++--------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/TODO.md b/TODO.md index 5fb6cb475..c2c78945a 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,9 @@ # High priority +* show nodeinfo list on gui - one card per node +* when a text arrives, move that node info card to the bottom on the window - put the text to the left of the card. with a small arrow/distance/shortname +* all chat in the app defaults to group chat +* show connection state on gui * when notified phone should download messages * at connect we might receive messages before finished downloading the nodeinfo. In that case, process those messages later * investigate the Signal SMS message flow path, see if I could just make Mesh a third peer to signal & sms? @@ -20,6 +24,7 @@ * fix BT device scanning * call crashlytics from exceptionReporter!!! currently not logging failures caught there * if nessary restart entire BT adapter with this tip from Michael https://stackoverflow.com/questions/35103701/ble-android-onconnectionstatechange-not-being-called +* show direction and distance on the nodeinfo cards # Medium priority diff --git a/app/src/main/java/com/geeksville/mesh/MainActivity.kt b/app/src/main/java/com/geeksville/mesh/MainActivity.kt index 2d437133c..35cda8c1b 100644 --- a/app/src/main/java/com/geeksville/mesh/MainActivity.kt +++ b/app/src/main/java/com/geeksville/mesh/MainActivity.kt @@ -29,6 +29,7 @@ import androidx.ui.material.Button import androidx.ui.material.MaterialTheme import androidx.ui.tooling.preview.Preview import com.geeksville.android.Logging +import com.geeksville.util.exceptionReporter import com.google.firebase.crashlytics.FirebaseCrashlytics @@ -100,21 +101,23 @@ class MainActivity : AppCompatActivity(), Logging { } private fun sendTestPackets() { - val m = meshService!! + exceptionReporter { + val m = meshService!! - // Do some test operations - m.setOwner("+16508675309", "Kevin Xter", "kx") - val testPayload = "hello world".toByteArray() - m.sendData( - "+16508675310", - testPayload, - MeshProtos.Data.Type.SIGNAL_OPAQUE_VALUE - ) - m.sendData( - "+16508675310", - testPayload, - MeshProtos.Data.Type.CLEAR_TEXT_VALUE - ) + // Do some test operations + m.setOwner("+16508675309", "Kevin Xter", "kx") + val testPayload = "hello world".toByteArray() + m.sendData( + "+16508675310", + testPayload, + MeshProtos.Data.Type.SIGNAL_OPAQUE_VALUE + ) + m.sendData( + "+16508675310", + testPayload, + MeshProtos.Data.Type.CLEAR_TEXT_VALUE + ) + } } @Composable