100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Console update: Ignore failing images (#709)
Rich Turner897196e48438
diff --git a/console/android/GenericApp/build.gradle b/console/android/GenericApp/build.gradleindex 12a12f33c..7f7e152db 100644--- a/console/android/GenericApp/build.gradle+++ b/console/android/GenericApp/build.gradle@@ -6,7 +6,7 @@ buildscript {jcenter()}dependencies {- classpath 'com.android.tools.build:gradle:7.1.1'+ classpath 'com.android.tools.build:gradle:7.1.3'classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"classpath 'com.google.gms:google-services:4.3.10'// NOTE: Do not place your application dependencies here; they belong@@ -23,4 +23,4 @@ allprojects {task clean(type: Delete) {delete rootProject.buildDir-}\ No newline at end of file+}diff --git a/console/android/ORLib/src/main/java/io/openremote/orlib/ui/OrMainActivity.kt b/console/android/ORLib/src/main/java/io/openremote/orlib/ui/OrMainActivity.ktindex dee0ccc76..de8c52c3e 100644--- a/console/android/ORLib/src/main/java/io/openremote/orlib/ui/OrMainActivity.kt+++ b/console/android/ORLib/src/main/java/io/openremote/orlib/ui/OrMainActivity.kt@@ -31,6 +31,7 @@ import com.fasterxml.jackson.module.kotlin.jacksonObjectMapperimport com.google.android.material.floatingactionbutton.FloatingActionButtonimport com.google.firebase.messaging.FirebaseMessagingimport io.openremote.orlib.ORConstants+import io.openremote.orlib.ORConstants.BASE_URL_KEYimport io.openremote.orlib.Rimport io.openremote.orlib.databinding.ActivityOrMainBindingimport io.openremote.orlib.models.ORAppConfig@@ -141,9 +142,9 @@ open class OrMainActivity : Activity() {ORAppConfig::class.java)}-- if (intent.hasExtra(ORConstants.BASE_URL_KEY)) {- baseUrl = intent.getStringExtra(ORConstants.BASE_URL_KEY)++ if (intent.hasExtra(BASE_URL_KEY)) {+ baseUrl = intent.getStringExtra(BASE_URL_KEY)}if (appConfig == null) {@@ -506,7 +507,14 @@ open class OrMainActivity : Activity() {failingUrl: String?) {LOG.warning("Error requesting '$failingUrl': $errorCode($description)")-+ //TODO should we always ignore image errors?+ if (failingUrl != null && (failingUrl.endsWith("png")+ || failingUrl.endsWith("jpg")+ || failingUrl.endsWith("ico"))+ ) {+ LOG.info("Ignoring error loading image resource")+ return+ }//TODO should we always ignore image errors and locale json files?if (failingUrl != null && (failingUrl.endsWith("png")|| failingUrl.endsWith("jpg")