expo-location 16.5.0 → 16.5.1
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/CHANGELOG.md +4 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/location/LocationModule.kt +5 -2
- package/android/src/main/java/expo/modules/location/records/LocationArguments.kt +5 -5
- package/android/src/main/java/expo/modules/location/records/LocationResults.kt +3 -3
- package/android/src/main/java/expo/modules/location/taskConsumers/GeofencingTaskConsumer.kt +0 -1
- package/expo-location-0.0.1-canary-20231129-c0ec023.tgz +0 -0
- package/expo-location-0.0.1-canary-20231130-c8a9bf9.tgz +0 -0
- package/expo-location-0.0.1-canary-20231130-ede75a7-1.tgz +0 -0
- package/expo-location-0.0.1-canary-20231130-ede75a7.tgz +0 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '16.5.
|
|
6
|
+
version = '16.5.1'
|
|
7
7
|
|
|
8
8
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
9
9
|
if (expoModulesCorePlugin.exists()) {
|
|
@@ -94,7 +94,7 @@ android {
|
|
|
94
94
|
namespace "expo.modules.location"
|
|
95
95
|
defaultConfig {
|
|
96
96
|
versionCode 29
|
|
97
|
-
versionName "16.5.
|
|
97
|
+
versionName "16.5.1"
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -522,7 +522,8 @@ class LocationModule : Module(), LifecycleEventListener, SensorEventListener, Ac
|
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
mSensorManager.registerListener(
|
|
525
|
-
this,
|
|
525
|
+
this,
|
|
526
|
+
mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD),
|
|
526
527
|
SensorManager.SENSOR_DELAY_NORMAL
|
|
527
528
|
)
|
|
528
529
|
mSensorManager.registerListener(this, mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_NORMAL)
|
|
@@ -749,7 +750,9 @@ class LocationModule : Module(), LifecycleEventListener, SensorEventListener, Ac
|
|
|
749
750
|
return it.isPermissionPresentInManifest(Manifest.permission.ACCESS_BACKGROUND_LOCATION)
|
|
750
751
|
}
|
|
751
752
|
throw NoPermissionsModuleException()
|
|
752
|
-
} else
|
|
753
|
+
} else {
|
|
754
|
+
true
|
|
755
|
+
}
|
|
753
756
|
}
|
|
754
757
|
|
|
755
758
|
/**
|
|
@@ -22,7 +22,7 @@ internal open class LocationOptions(
|
|
|
22
22
|
@Field var accuracy: Int = ACCURACY_BALANCED,
|
|
23
23
|
@Field var distanceInterval: Int? = null,
|
|
24
24
|
@Field var mayShowUserSettingsDialog: Boolean = true,
|
|
25
|
-
@Field var timeInterval: Long? = null
|
|
25
|
+
@Field var timeInterval: Long? = null
|
|
26
26
|
) : Record, Serializable {
|
|
27
27
|
constructor(map: Map<String, Any?>) : this(
|
|
28
28
|
accuracy = map["accuracy"] as? Int ?: ACCURACY_BALANCED,
|
|
@@ -36,7 +36,7 @@ internal class ReverseGeocodeLocation(
|
|
|
36
36
|
@Field var latitude: Double,
|
|
37
37
|
@Field var longitude: Double,
|
|
38
38
|
@Field var accuracy: Float? = null,
|
|
39
|
-
@Field var altitude: Double? = null
|
|
39
|
+
@Field var altitude: Double? = null
|
|
40
40
|
) : Record, Serializable
|
|
41
41
|
|
|
42
42
|
internal class LocationTaskOptions(
|
|
@@ -61,14 +61,14 @@ internal class LocationTaskServiceOptions(
|
|
|
61
61
|
@Field var notificationTitle: String? = null,
|
|
62
62
|
@Field var notificationBody: String? = null,
|
|
63
63
|
@Field var killServiceOnDestroy: Boolean? = null,
|
|
64
|
-
@Field var notificationColor: String? = null
|
|
64
|
+
@Field var notificationColor: String? = null
|
|
65
65
|
) : Record, Serializable {
|
|
66
66
|
|
|
67
67
|
internal fun toMutableMap() = mutableMapOf(
|
|
68
68
|
"notificationTitle" to notificationTitle,
|
|
69
69
|
"notificationBody" to notificationBody,
|
|
70
70
|
"killServiceOnDestroy" to killServiceOnDestroy,
|
|
71
|
-
"notificationColor" to notificationColor
|
|
71
|
+
"notificationColor" to notificationColor
|
|
72
72
|
)
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -96,6 +96,6 @@ internal class Region(
|
|
|
96
96
|
"notifyOnEnter" to notifyOnEnter,
|
|
97
97
|
"notifyOnExit" to notifyOnExit,
|
|
98
98
|
"radius" to radius,
|
|
99
|
-
"state" to state
|
|
99
|
+
"state" to state
|
|
100
100
|
)
|
|
101
101
|
}
|
|
@@ -46,7 +46,7 @@ internal class LocationProviderStatus(
|
|
|
46
46
|
@Field var gpsAvailable: Boolean? = false,
|
|
47
47
|
@Field var networkAvailable: Boolean? = null,
|
|
48
48
|
@Field var locationServicesEnabled: Boolean = false,
|
|
49
|
-
@Field var passiveAvailable: Boolean? = null
|
|
49
|
+
@Field var passiveAvailable: Boolean? = null
|
|
50
50
|
) : Record, Serializable
|
|
51
51
|
|
|
52
52
|
internal class Heading(
|
|
@@ -112,7 +112,7 @@ internal class LocationObjectCoords(
|
|
|
112
112
|
@Field var accuracy: Double? = null,
|
|
113
113
|
@Field var altitudeAccuracy: Double? = null,
|
|
114
114
|
@Field var heading: Double? = null,
|
|
115
|
-
@Field var speed: Double? = null
|
|
115
|
+
@Field var speed: Double? = null
|
|
116
116
|
) : Record, Serializable {
|
|
117
117
|
constructor(location: Location) : this(
|
|
118
118
|
latitude = location.latitude,
|
|
@@ -152,7 +152,7 @@ internal class GeocodeResponse(
|
|
|
152
152
|
@Field var latitude: Double,
|
|
153
153
|
@Field var longitude: Double,
|
|
154
154
|
@Field var accuracy: Float? = null,
|
|
155
|
-
@Field var altitude: Double? = null
|
|
155
|
+
@Field var altitude: Double? = null
|
|
156
156
|
) : Record, Serializable {
|
|
157
157
|
companion object {
|
|
158
158
|
fun from(location: Location): GeocodeResponse? {
|
|
@@ -202,7 +202,6 @@ class GeofencingTaskConsumer(context: Context, taskManagerUtils: TaskManagerUtil
|
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
private fun bundleFromRegion(identifier: String, region: Map<String, Any>): PersistableBundle {
|
|
205
|
-
|
|
206
205
|
return PersistableBundle().apply {
|
|
207
206
|
val radius = getParamAsDouble(region["radius"], "Region: radius: `${region["radius"]}` can't be cast to Double")
|
|
208
207
|
val longitude = getParamAsDouble(region["longitude"], "Region: longitude: `${region["longitude"]}` can't be cast to Double")
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-location",
|
|
3
|
-
"version": "16.5.
|
|
3
|
+
"version": "16.5.1",
|
|
4
4
|
"description": "Allows reading geolocation information from the device. Your app can poll for the current location or subscribe to location update events.",
|
|
5
5
|
"main": "build/Location.js",
|
|
6
6
|
"types": "build/Location.d.ts",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"expo": "*"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "43f1b4f8a5a9bca649e4e7ca6e4155482a162431"
|
|
48
48
|
}
|