expo-beacon 0.7.21 → 0.7.23
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.
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withBeaconAndroid.d.ts","sourceRoot":"","sources":["../src/withBeaconAndroid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoB,MAAM,sBAAsB,CAAC;AAMtE,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"withBeaconAndroid.d.ts","sourceRoot":"","sources":["../src/withBeaconAndroid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoB,MAAM,sBAAsB,CAAC;AAMtE,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CA0BlE;AAqCD,QAAA,MAAM,iBAAiB,EAAE,YA0DxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -11,19 +11,24 @@ package ${packageName}
|
|
|
11
11
|
|
|
12
12
|
import android.content.Context
|
|
13
13
|
import com.transistorsoft.locationmanager.adapter.BackgroundGeolocation
|
|
14
|
+
import com.transistorsoft.locationmanager.adapter.callback.TSCallback
|
|
14
15
|
import expo.modules.beacon.BeaconEventPlugin
|
|
15
16
|
|
|
16
17
|
class BeaconGeoPlugin(ctx: Context) : BeaconEventPlugin {
|
|
17
18
|
private val bgGeo = BackgroundGeolocation.getInstance(ctx, null)
|
|
19
|
+
private val noOp = object : TSCallback {
|
|
20
|
+
override fun onSuccess() {}
|
|
21
|
+
override fun onFailure(error: String) {}
|
|
22
|
+
}
|
|
18
23
|
|
|
19
24
|
override fun onBeaconEnter(identifier: String, uuid: String, major: Int, minor: Int, distance: Double) =
|
|
20
|
-
bgGeo.start()
|
|
25
|
+
bgGeo.start(noOp)
|
|
21
26
|
override fun onBeaconExit(identifier: String, uuid: String, major: Int, minor: Int, distance: Double) =
|
|
22
|
-
bgGeo.stop()
|
|
27
|
+
bgGeo.stop(noOp)
|
|
23
28
|
override fun onEddystoneEnter(identifier: String, namespace: String, instance: String, distance: Double) =
|
|
24
|
-
bgGeo.start()
|
|
29
|
+
bgGeo.start(noOp)
|
|
25
30
|
override fun onEddystoneExit(identifier: String, namespace: String, instance: String, distance: Double) =
|
|
26
|
-
bgGeo.stop()
|
|
31
|
+
bgGeo.stop(noOp)
|
|
27
32
|
}
|
|
28
33
|
`;
|
|
29
34
|
}
|