From 444485658fd2baeeb5cae2b76ed798a10215724a Mon Sep 17 00:00:00 2001 From: geeksville Date: Wed, 11 Mar 2020 14:46:02 -0700 Subject: [PATCH] track # of users with radios --- .../com/geeksville/mesh/service/RadioInterfaceService.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt b/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt index 6b0e485a..976b846f 100644 --- a/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt +++ b/app/src/main/java/com/geeksville/mesh/service/RadioInterfaceService.kt @@ -9,6 +9,7 @@ import android.content.Intent import android.os.IBinder import androidx.core.content.edit import com.geeksville.android.BinaryLogFile +import com.geeksville.android.GeeksvilleApplication import com.geeksville.android.Logging import com.geeksville.concurrent.DeferredExecution import com.geeksville.mesh.IRadioInterfaceService @@ -168,6 +169,12 @@ class RadioInterfaceService : Service(), Logging { putString(DEVADDR_KEY, addr) } + // Record that this use has configured a radio + GeeksvilleApplication.analytics.track( + "mesh_bond" + ) + + // Force the service to reconnect runningService?.let { it.setEnabled(addr != null) }