@magicred-1/react-native-lxmf 0.2.29 → 0.2.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ import expo.modules.kotlin.modules.ModuleDefinition
8
8
  import org.json.JSONArray
9
9
 
10
10
  private const val TAG = "LxmfModule"
11
- private const val POLL_INTERVAL_MS = 500L
11
+ private const val POLL_INTERVAL_MS = 80L
12
12
 
13
13
  class LxmfModule : Module() {
14
14
  private val pollHandler = Handler(Looper.getMainLooper())
@@ -78,10 +78,12 @@ class LxmfModule : Module() {
78
78
  val rc = nativeStart(identityHex, lxmfAddressHex, mode, announceIntervalMs.toLong(),
79
79
  bleMtuHint.toShort(), interfacesJson, displayName, isBeacon)
80
80
  if (rc != 0) throw RuntimeException("nativeStart returned $rc")
81
+ bleManager?.start()
81
82
  true
82
83
  }
83
84
 
84
85
  AsyncFunction("stop") {
86
+ bleManager?.stop()
85
87
  val rc = nativeStop()
86
88
  if (rc != 0) throw RuntimeException("nativeStop returned $rc")
87
89
  true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magicred-1/react-native-lxmf",
3
- "version": "0.2.29",
3
+ "version": "0.2.30",
4
4
  "description": "LXMF Reticulum mesh networking for React Native + Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",