diff --git a/sdk/src/main/java/io/radar/sdk/RadarApiClient.kt b/sdk/src/main/java/io/radar/sdk/RadarApiClient.kt index f3930700..55770bb2 100644 --- a/sdk/src/main/java/io/radar/sdk/RadarApiClient.kt +++ b/sdk/src/main/java/io/radar/sdk/RadarApiClient.kt @@ -103,7 +103,8 @@ internal class RadarApiClient( "X-Radar-Device-Model" to RadarUtils.deviceModel, "X-Radar-Device-OS" to RadarUtils.deviceOS, "X-Radar-Device-Type" to RadarUtils.deviceType, - "X-Radar-SDK-Version" to RadarUtils.sdkVersion + "X-Radar-SDK-Version" to RadarUtils.sdkVersion, + "X-Radar-Mobile-Origin" to context.packageName ) if (RadarSettings.isXPlatform(context)) { headers["X-Radar-X-Platform-SDK-Type"] = RadarSettings.getXPlatformSDKType(context) diff --git a/sdk/src/main/java/io/radar/sdk/model/RadarAddress.kt b/sdk/src/main/java/io/radar/sdk/model/RadarAddress.kt index 346b0c11..61ae6354 100644 --- a/sdk/src/main/java/io/radar/sdk/model/RadarAddress.kt +++ b/sdk/src/main/java/io/radar/sdk/model/RadarAddress.kt @@ -107,6 +107,11 @@ class RadarAddress( */ val plus4: String?, + /** + * The distance to the search anchor in meters + */ + val distance: Int?, + /** * The layer of the address */ @@ -155,6 +160,7 @@ class RadarAddress( private const val FIELD_PLACE_LABEL = "placeLabel" private const val FIELD_UNIT = "unit" private const val FIELD_PLUS4 = "plus4" + private const val FIELD_DISTANCE = "distance" private const val FIELD_LAYER = "layer" private const val FIELD_METADATA = "metadata" private const val FIELD_CONFIDENCE = "confidence" @@ -185,6 +191,7 @@ class RadarAddress( val placeLabel = obj.optString(FIELD_PLACE_LABEL) ?: null val unit = obj.optString(FIELD_UNIT) ?: null val plus4 = obj.optString(FIELD_PLUS4) ?: null + val distance = obj.optInt(FIELD_DISTANCE) val layer = obj.optString(FIELD_LAYER) ?: null val metadata: JSONObject? = obj.optJSONObject(FIELD_METADATA) ?: null val confidence = when(obj.optString(FIELD_CONFIDENCE)) { @@ -215,6 +222,7 @@ class RadarAddress( placeLabel, unit, plus4, + distance, layer, metadata, confidence @@ -288,6 +296,7 @@ class RadarAddress( obj.putOpt(FIELD_PLACE_LABEL, this.placeLabel) obj.putOpt(FIELD_UNIT, this.unit) obj.putOpt(FIELD_PLUS4, this.plus4) + obj.putOpt(FIELD_DISTANCE, this.distance) obj.putOpt(FIELD_LAYER, this.layer) obj.putOpt(FIELD_METADATA, this.metadata) obj.putOpt(FIELD_CONFIDENCE, stringForConfidence(this.confidence))