Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Console fixes for new geofence URLs

Rich Turner81fb46e9f3a9
diff --git a/console/android/src/main/java/org/openremote/android/MainActivity.java b/console/android/src/main/java/org/openremote/android/MainActivity.java
index e77a95023..2aaca4141 100644
--- a/console/android/src/main/java/org/openremote/android/MainActivity.java
+++ b/console/android/src/main/java/org/openremote/android/MainActivity.java
@@ -534,7 +534,7 @@ public class MainActivity extends Activity {
String consoleId = data.getString("consoleId");
if (consoleId != null) {
((MainActivity) activity).consoleId = consoleId;
- geofenceProvider.enable(MainActivity.this, String.format("%s/%s",
+ geofenceProvider.enable(MainActivity.this, String.format("%s/api/%s",
getString(R.string.OR_BASE_SERVER),
getString(R.string.OR_REALM)),
consoleId, new GeofenceProvider.EnableCallback() {
diff --git a/console/android/src/main/java/org/openremote/android/service/GeofenceProvider.kt b/console/android/src/main/java/org/openremote/android/service/GeofenceProvider.kt
index dbb57e7d8..c0dd3229d 100644
--- a/console/android/src/main/java/org/openremote/android/service/GeofenceProvider.kt
+++ b/console/android/src/main/java/org/openremote/android/service/GeofenceProvider.kt
@@ -128,7 +128,7 @@ class GeofenceProvider(val context: Context) : ActivityCompat.OnRequestPermissio
}
val version = "ORConsole"
- val geofenceFetchEndpoint = "rules/geofences/"
+ val geofenceFetchEndpoint = "api/rules/geofences/"
private val geofencingClient: GeofencingClient by lazy {
LocationServices.getGeofencingClient(context)
diff --git a/console/iOS/ORLib/ORLib/ORViewController.swift b/console/iOS/ORLib/ORLib/ORViewController.swift
index 952ab3973..1ab2c968f 100644
--- a/console/iOS/ORLib/ORLib/ORViewController.swift
+++ b/console/iOS/ORLib/ORLib/ORViewController.swift
@@ -82,7 +82,7 @@ open class ORViewcontroller : UIViewController, URLSessionDelegate, WKScriptMess
} else if action == Actions.providerEnable {
if let data = postMessageDict[DefaultsKey.dataKey] as? [String: String] {
if let consoleId = data[GeofenceProvider.consoleIdKey] {
- geofenceProvider?.enable(baseUrl: "\(ORServer.baseUrl)\(ORServer.realm)", consoleId: consoleId, callback: { enableData in
+ geofenceProvider?.enable(baseUrl: "\(ORServer.baseUrl)api/\(ORServer.realm)", consoleId: consoleId, callback: { enableData in
self.sendData(data: enableData)
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(3)) {
self.geofenceProvider?.fetchGeofences()