@expofp/react-native-efp-crowdconnected 0.1.3 → 0.1.4

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.
@@ -78,12 +78,20 @@ data class ExpoFpPosition(
78
78
  lat = null,
79
79
  lng = null
80
80
  )
81
+ "GEO" -> ExpoFpPosition(
82
+ x = null,
83
+ y = null,
84
+ z = z,
85
+ angle = angle,
86
+ lat = latitude,
87
+ lng = longitude
88
+ )
81
89
  else -> {
82
- // GEO and unknown types: only lat/lng, no x/y
83
- // GEO location type uses lat/lng only
90
+ // Unknown or mixed types: include all available coordinates
91
+ // This ensures blue dot works even if locationType is unexpected
84
92
  ExpoFpPosition(
85
- x = null,
86
- y = null,
93
+ x = xPixels,
94
+ y = yPixels,
87
95
  z = z,
88
96
  angle = angle,
89
97
  lat = latitude,
@@ -407,8 +407,11 @@ class RCTCrowdConnectedLocationProviderModule(
407
407
  val statusCallback = object : StatusCallback {
408
408
  override fun onStartUpSuccess() {
409
409
  Log.d(TAG, "StatusCallback: SDK startup successful")
410
- // Cancel timeout on SDK startup success
411
410
  cancelTimeoutJob()
411
+ registerPositionCallback()
412
+ CrowdConnected.getInstance()?.getDeviceId()?.let {
413
+ providerInfo = providerInfo.copy(deviceId = it)
414
+ }
412
415
  }
413
416
 
414
417
  override fun onStartUpFailure(reason: String) {
@@ -466,20 +469,8 @@ class RCTCrowdConnectedLocationProviderModule(
466
469
  CrowdConnected.start(app, config)
467
470
 
468
471
  Log.i(TAG, "CrowdConnected SDK start initiated")
469
-
470
- // Get device ID from CrowdConnected instance
471
- val deviceId = CrowdConnected.getInstance()?.getDeviceId()
472
- if (deviceId != null) {
473
- providerInfo = providerInfo.copy(deviceId = deviceId)
474
- Log.d(TAG, "Device ID set: $deviceId")
475
- }
476
-
477
- // Mark as started (SDK successfully started)
478
472
  isStarted = true
479
473
 
480
- // Register position callback
481
- registerPositionCallback()
482
-
483
474
  // Apply aliases
484
475
  if (currentSettings.aliases.isNotEmpty()) {
485
476
  Log.d(TAG, "Applying ${currentSettings.aliases.size} aliases")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/react-native-efp-crowdconnected",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "React Native wrapper for ExpoFP around CrowdConnected SDK",
5
5
  "keywords": [
6
6
  "react-native",