From f086d0d03bc383c7494ba3de2fd449b99b932ffb Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Sat, 16 Dec 2023 17:03:38 +0000 Subject: [PATCH 1/4] Bug fix for devices with API 3.1.0 1) Removed WatchUi.getCurrentView() API call in favour of a new method of ensuring only one ErrorView is pushed at a time. 2) Any error view will be cancelled when responses start working again, e.g. watch gets in Bluetooth range of the phone again. 3) Added error message decoding for misspelled entities. Co-Authored-By: Joseph Abbey --- source/ErrorView.mc | 71 +++++++++++-- source/HomeAssistantApp.mc | 28 +++--- source/HomeAssistantConfirmation.mc | 19 ++-- source/HomeAssistantService.mc | 21 ++-- source/HomeAssistantToggleMenuItem.mc | 140 ++++++++++++++------------ 5 files changed, 171 insertions(+), 108 deletions(-) diff --git a/source/ErrorView.mc b/source/ErrorView.mc index 5dbadc0..ce42c36 100644 --- a/source/ErrorView.mc +++ b/source/ErrorView.mc @@ -18,6 +18,15 @@ // should not happen of course... but they do, so best make sure errors can be // reported. // +// Designed so that a single ErrorView is used for all errors and hence can ensure +// that only the first call to display is honoured until the view is dismissed. +// This compensates for older devices not being able to call WatchUi.getCurrentView() +// due to not supporting API level 3.4.0. +// +// Usage: +// 1) ErrorView.show("Error message"); +// 2) return ErrorView.create("Error message"); // as Lang.Array +// //----------------------------------------------------------------------------------- using Toybox.Graphics; @@ -26,18 +35,22 @@ using Toybox.WatchUi; using Toybox.Communications; class ErrorView extends ScalableView { - private const cSettings as Lang.Dictionary = { + private var mText as Lang.String = ""; + private var mDelegate as ErrorDelegate; + private const cSettings as Lang.Dictionary = { :errorIconMargin => 7f }; // Vertical spacing between the top of the face and the error icon - private var mErrorIconMargin; - private var mText as Lang.String; + private var mErrorIconMargin as Lang.Number; private var mErrorIcon; private var mTextArea; - function initialize(text as Lang.String) { + private static var instance; + private static var mShown as Lang.Boolean = false; + + function initialize() { ScalableView.initialize(); - mText = text; + mDelegate = new ErrorDelegate(self); // Convert the settings from % of screen size to pixels mErrorIconMargin = pixelsForScreen(cSettings.get(:errorIconMargin) as Lang.Float); } @@ -75,15 +88,59 @@ class ErrorView extends ScalableView { mTextArea.draw(dc); } + function getDelegate() as ErrorDelegate { + return mDelegate; + } + + static function create(text as Lang.String) as Lang.Array { + if (instance == null) { + instance = new ErrorView(); + } + if (!mShown) { + instance.setText(text); + } + return [instance, instance.getDelegate()]; + } + + // Create or reuse an existing ErrorView, and pass on the text. + static function show(text as Lang.String) as Void { + create(text); // Ignore returned values + if (!mShown) { + WatchUi.pushView(instance, instance.getDelegate(), WatchUi.SLIDE_UP); + mShown = true; + } + } + + // Internal show now we're not a static method like 'show()'. + function setText(text as Lang.String) as Void { + mText = text; + if (mTextArea != null) { + mTextArea.setText(text); + requestUpdate(); + } + } + + static function unShow() as Void { + if (mShown) { + mShown = false; + WatchUi.popView(WatchUi.SLIDE_DOWN); + } + } + } class ErrorDelegate extends WatchUi.BehaviorDelegate { - function initialize() { + //private var mView as ErrorView; + + function initialize(view as ErrorView) { WatchUi.BehaviorDelegate.initialize(); + //mView = view; } + function onBack() { getApp().getQuitTimer().reset(); - WatchUi.popView(WatchUi.SLIDE_DOWN); + ErrorView.unShow(); return true; } + } \ No newline at end of file diff --git a/source/HomeAssistantApp.mc b/source/HomeAssistantApp.mc index dc1651f..fe862e8 100644 --- a/source/HomeAssistantApp.mc +++ b/source/HomeAssistantApp.mc @@ -74,32 +74,32 @@ class HomeAssistantApp extends Application.AppBase { if (Globals.scDebug) { System.println("HomeAssistantApp getInitialView(): No API key in the application settings."); } - return [new ErrorView(strNoApiKey + "."), new ErrorDelegate()] as Lang.Array; + return ErrorView.create(strNoApiKey + "."); } else if (api_url.length() == 0) { if (Globals.scDebug) { System.println("HomeAssistantApp getInitialView(): No API URL in the application settings."); } - return [new ErrorView(strNoApiUrl + "."), new ErrorDelegate()] as Lang.Array; + return ErrorView.create(strNoApiUrl + "."); } else if (api_url.substring(-1, api_url.length()).equals("/")) { if (Globals.scDebug) { System.println("HomeAssistantApp getInitialView(): API URL must not have a trailing slash '/'."); } - return [new ErrorView(strTrailingSlashErr + "."), new ErrorDelegate()] as Lang.Array; + return ErrorView.create(strTrailingSlashErr + "."); } else if ((Properties.getValue("config_url") as Lang.String).length() == 0) { if (Globals.scDebug) { System.println("HomeAssistantApp getInitialView(): No configuration URL in the application settings."); } - return [new ErrorView(strNoConfigUrl + "."), new ErrorDelegate()] as Lang.Array; + return ErrorView.create(strNoConfigUrl + "."); } else if (! System.getDeviceSettings().phoneConnected) { if (Globals.scDebug) { System.println("HomeAssistantApp fetchMenuConfig(): No Phone connection, skipping API call."); } - return [new ErrorView(strNoPhone + "."), new ErrorDelegate()] as Lang.Array; + return ErrorView.create(strNoPhone + "."); } else if (! System.getDeviceSettings().connectionAvailable) { if (Globals.scDebug) { System.println("HomeAssistantApp fetchMenuConfig(): No Internet connection, skipping API call."); } - return [new ErrorView(strNoInternet + "."), new ErrorDelegate()] as Lang.Array; + return ErrorView.create(strNoInternet + "."); } else { fetchMenuConfig(); return [new WatchUi.View(), new WatchUi.BehaviorDelegate()] as Lang.Array; @@ -117,25 +117,23 @@ class HomeAssistantApp extends Application.AppBase { if (Globals.scDebug) { System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed."); } - WatchUi.pushView(new ErrorView(strNoPhone + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoPhone + "."); } else if (responseCode == Communications.BLE_QUEUE_FULL) { if (Globals.scDebug) { System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: BLE_QUEUE_FULL, API calls too rapid."); } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strApiFlood), new ErrorDelegate(), WatchUi.SLIDE_UP); - } + // Don't need to worry about multiple ErrorViews here as the fetch does not happen a second time. + ErrorView.show(strApiFlood); } else if (responseCode == Communications.NETWORK_REQUEST_TIMED_OUT) { if (Globals.scDebug) { System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection."); } - WatchUi.pushView(new ErrorView(strNoResponse), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoResponse); } else if (responseCode == 404) { if (Globals.scDebug) { System.println("HomeAssistantApp onReturnFetchMenuConfig() Response Code: 404, page not found. Check Configuration URL setting."); } - WatchUi.pushView(new ErrorView(strConfigUrlNotFound), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strConfigUrlNotFound); } else if (responseCode == 200) { mHaMenu = new HomeAssistantView(data, null); WatchUi.switchToView(mHaMenu, new HomeAssistantViewDelegate(), WatchUi.SLIDE_IMMEDIATE); @@ -149,12 +147,12 @@ class HomeAssistantApp extends Application.AppBase { if (Globals.scDebug) { System.println("HomeAssistantApp onReturnFetchMenuConfig(): Network request timeout."); } - WatchUi.pushView(new ErrorView(strNoMenu + ". " + strNoInternet + "?"), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoMenu + ". " + strNoInternet + "?"); } else { if (Globals.scDebug) { System.println("HomeAssistantApp onReturnFetchMenuConfig(): Unhandled HTTP response code = " + responseCode); } - WatchUi.pushView(new ErrorView(strUnhandledHttpErr + responseCode ), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strUnhandledHttpErr + responseCode ); } } diff --git a/source/HomeAssistantConfirmation.mc b/source/HomeAssistantConfirmation.mc index 24381a3..951fd1d 100644 --- a/source/HomeAssistantConfirmation.mc +++ b/source/HomeAssistantConfirmation.mc @@ -26,6 +26,7 @@ using Toybox.Timer; using Toybox.Application.Properties; class HomeAssistantConfirmation extends WatchUi.Confirmation { + function initialize() { WatchUi.Confirmation.initialize(WatchUi.loadResource($.Rez.Strings.Confirm)); } @@ -33,32 +34,32 @@ class HomeAssistantConfirmation extends WatchUi.Confirmation { } class HomeAssistantConfirmationDelegate extends WatchUi.ConfirmationDelegate { - private var confirmMethod; - private var timeout; + private var mConfirmMethod; + private var mTimer; function initialize(callback as Method() as Void) { WatchUi.ConfirmationDelegate.initialize(); - confirmMethod = callback; + mConfirmMethod = callback; var timeoutSeconds = Properties.getValue("confirm_timeout") as Lang.Number; if (timeoutSeconds > 0) { - timeout = new Timer.Timer(); - timeout.start(method(:onTimeout), timeoutSeconds * 1000, true); + mTimer = new Timer.Timer(); + mTimer.start(method(:onTimeout), timeoutSeconds * 1000, true); } } function onResponse(response) as Lang.Boolean { getApp().getQuitTimer().reset(); - if (timeout) { - timeout.stop(); + if (mTimer) { + mTimer.stop(); } if (response == WatchUi.CONFIRM_YES) { - confirmMethod.invoke(); + mConfirmMethod.invoke(); } return true; } function onTimeout() as Void { - timeout.stop(); + mTimer.stop(); WatchUi.popView(WatchUi.SLIDE_RIGHT); } } diff --git a/source/HomeAssistantService.mc b/source/HomeAssistantService.mc index 2f371a9..6b2b905 100644 --- a/source/HomeAssistantService.mc +++ b/source/HomeAssistantService.mc @@ -54,25 +54,23 @@ class HomeAssistantService { if (Globals.scDebug) { System.println("HomeAssistantService onReturnCall() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed."); } - WatchUi.pushView(new ErrorView(strNoPhone + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoPhone + "."); } else if (responseCode == Communications.BLE_QUEUE_FULL) { if (Globals.scDebug) { System.println("HomeAssistantService onReturnCall() Response Code: BLE_QUEUE_FULL, API calls too rapid."); } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strApiFlood), new ErrorDelegate(), WatchUi.SLIDE_UP); - } + // Don't need to worry about multiple ErrorViews here as the call is not on a repeat timer. + ErrorView.show(strApiFlood); } else if (responseCode == Communications.NETWORK_REQUEST_TIMED_OUT) { if (Globals.scDebug) { System.println("HomeAssistantService onReturnCall() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection."); } - WatchUi.pushView(new ErrorView(strNoResponse), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoResponse); } else if (responseCode == 404) { if (Globals.scDebug) { System.println("HomeAssistantService onReturnCall() Response Code: 404, page not found. Check API URL setting."); } - WatchUi.pushView(new ErrorView(strApiUrlNotFound), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strApiUrlNotFound); } else if (responseCode == 200) { if (Globals.scDebug) { System.println("HomeAssistantService onReturnCall(): Service executed."); @@ -99,7 +97,7 @@ class HomeAssistantService { if (Globals.scDebug) { System.println("HomeAssistantService onReturnCall(): Unhandled HTTP response code = " + responseCode); } - WatchUi.pushView(new ErrorView(strUnhandledHttpErr + responseCode ), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strUnhandledHttpErr + responseCode ); } } @@ -117,14 +115,15 @@ class HomeAssistantService { if (Globals.scDebug) { System.println("HomeAssistantService call(): No Phone connection, skipping API call."); } - WatchUi.pushView(new ErrorView(strNoPhone + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoPhone + "."); } else if (! System.getDeviceSettings().connectionAvailable) { if (Globals.scDebug) { System.println("HomeAssistantService call(): No Internet connection, skipping API call."); } - WatchUi.pushView(new ErrorView(strNoInternet + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoInternet + "."); } else { - var url = (Properties.getValue("api_url") as Lang.String) + "/services/" + service.substring(0, service.find(".")) + "/" + service.substring(service.find(".")+1, null); + // Can't user null for parameters due to API version level. + var url = (Properties.getValue("api_url") as Lang.String) + "/services/" + service.substring(0, service.find(".")) + "/" + service.substring(service.find(".")+1, service.length()); if (Globals.scDebug) { System.println("HomeAssistantService call() URL=" + url); System.println("HomeAssistantService call() service=" + service); diff --git a/source/HomeAssistantToggleMenuItem.mc b/source/HomeAssistantToggleMenuItem.mc index 9bbbe89..a862663 100644 --- a/source/HomeAssistantToggleMenuItem.mc +++ b/source/HomeAssistantToggleMenuItem.mc @@ -77,56 +77,68 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { } // Provide the ability to terminate updating chain of calls for a permanent network error. var keepUpdating = true; - if (responseCode == Communications.BLE_HOST_TIMEOUT || responseCode == Communications.BLE_CONNECTION_UNAVAILABLE) { - if (Globals.scDebug) { - System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed."); - } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strNoPhone + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); - } - } else if (responseCode == Communications.BLE_QUEUE_FULL) { - if (Globals.scDebug) { - System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: BLE_QUEUE_FULL, API calls too rapid."); - } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strApiFlood), new ErrorDelegate(), WatchUi.SLIDE_UP); - } - } else if (responseCode == Communications.NETWORK_REQUEST_TIMED_OUT) { - if (Globals.scDebug) { - System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection."); - } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strNoResponse), new ErrorDelegate(), WatchUi.SLIDE_UP); - } - } else if (responseCode == 404) { - if (Globals.scDebug) { - System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: 404, page not found. Check API URL setting."); - } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strApiUrlNotFound), new ErrorDelegate(), WatchUi.SLIDE_UP); - } - keepUpdating = false; - } else if (responseCode == 200) { - var state = data.get("state") as Lang.String; - if (Globals.scDebug) { - System.println((data.get("attributes") as Lang.Dictionary).get("friendly_name") + " State=" + state); - } - if (getLabel().equals("...")) { - setLabel((data.get("attributes") as Lang.Dictionary).get("friendly_name") as Lang.String); - } - setUiToggle(state); - } else { - if (Globals.scDebug) { - System.println("HomeAssistantToggleMenuItem onReturnGetState(): Unhandled HTTP response code = " + responseCode); - } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strUnhandledHttpErr + responseCode ), new ErrorDelegate(), WatchUi.SLIDE_UP); - } + switch (responseCode) { + case Communications.BLE_HOST_TIMEOUT: + case Communications.BLE_CONNECTION_UNAVAILABLE: + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed."); + } + ErrorView.show(strNoPhone + "."); + break; + case Communications.BLE_QUEUE_FULL: + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: BLE_QUEUE_FULL, API calls too rapid."); + } + ErrorView.show(strApiFlood); + break; + case Communications.NETWORK_REQUEST_TIMED_OUT: + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection."); + } + ErrorView.show(strNoResponse); + break; + case 404: + var msg = null; + if (data != null) { + msg = data.get("message"); + } + if (msg != null) { + // Should be an HTTP 405 according to curl queries + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: 404. " + mIdentifier + " " + msg); + } + ErrorView.show("HTTP 405, " + mIdentifier + ". " + data.get("message")); + } else { + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: 404, page not found. Check API URL setting."); + } + ErrorView.show(strApiUrlNotFound); + } + keepUpdating = false; + break; + case 405: + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem onReturnGetState() Response Code: 405. " + mIdentifier + " " + data.get("message")); + } + ErrorView.show("HTTP 405, " + mIdentifier + ". " + data.get("message")); + keepUpdating = false; + break; + case 200: + var state = data.get("state") as Lang.String; + if (Globals.scDebug) { + System.println((data.get("attributes") as Lang.Dictionary).get("friendly_name") + " State=" + state); + } + if (getLabel().equals("...")) { + setLabel((data.get("attributes") as Lang.Dictionary).get("friendly_name") as Lang.String); + } + setUiToggle(state); + ErrorView.unShow(); + break; + default: + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem onReturnGetState(): Unhandled HTTP response code = " + responseCode); + } + ErrorView.show(strUnhandledHttpErr + responseCode); } if (keepUpdating) { // Now this feels very "closely coupled" to the application, but it is the most reliable method instead of using a timer. @@ -147,18 +159,12 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem getState(): No Phone connection, skipping API call."); } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strNoPhone + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); - } + ErrorView.show(strNoPhone + "."); } else if (! System.getDeviceSettings().connectionAvailable) { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem getState(): No Internet connection, skipping API call."); } - if (!(WatchUi.getCurrentView()[0] instanceof ErrorView)) { - // Avoid pushing multiple ErrorViews - WatchUi.pushView(new ErrorView(strNoInternet + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); - } + ErrorView.show(strNoInternet + "."); } else { var url = Properties.getValue("api_url") + "/states/" + mIdentifier; if (Globals.scDebug) { @@ -180,7 +186,9 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { var myTimer = new Timer.Timer(); // Now this feels very "closely coupled" to the application, but it is the most reliable method instead of using a timer. myTimer.start(getApp().method(:updateNextMenuItem), 500, false); - System.println("HomeAssistantToggleMenuItem getState(): Updated failed " + mIdentifier); + if (Globals.scDebug) { + System.println("HomeAssistantToggleMenuItem getState(): Updated failed " + mIdentifier); + } } } @@ -195,22 +203,22 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: BLE_HOST_TIMEOUT or BLE_CONNECTION_UNAVAILABLE, Bluetooth connection severed."); } - WatchUi.pushView(new ErrorView(strNoPhone + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoPhone + "."); } else if (responseCode == Communications.BLE_QUEUE_FULL) { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: BLE_QUEUE_FULL, API calls too rapid."); } - WatchUi.pushView(new ErrorView(strApiFlood), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strApiFlood); } else if (responseCode == Communications.NETWORK_REQUEST_TIMED_OUT) { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: NETWORK_REQUEST_TIMED_OUT, check Internet connection."); } - WatchUi.pushView(new ErrorView(strNoResponse), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoResponse); } else if (responseCode == 404) { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem onReturnSetState() Response Code: 404, page not found. Check API URL setting."); } - WatchUi.pushView(new ErrorView(strApiUrlNotFound), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strApiUrlNotFound); } else if (responseCode == 200) { var state; var d = data as Lang.Array; @@ -227,7 +235,7 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem onReturnSetState(): Unhandled HTTP response code = " + responseCode); } - WatchUi.pushView(new ErrorView(strUnhandledHttpErr + responseCode ), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strUnhandledHttpErr + responseCode ); } } @@ -246,14 +254,14 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem { } // Toggle the UI back setEnabled(!isEnabled()); - WatchUi.pushView(new ErrorView(strNoPhone + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoPhone + "."); } else if (! System.getDeviceSettings().connectionAvailable) { if (Globals.scDebug) { System.println("HomeAssistantToggleMenuItem getState(): No Internet connection, skipping API call."); } // Toggle the UI back setEnabled(!isEnabled()); - WatchUi.pushView(new ErrorView(strNoInternet + "."), new ErrorDelegate(), WatchUi.SLIDE_UP); + ErrorView.show(strNoInternet + "."); } else { // Updated SDK and got a new error // ERROR: venu: Cannot find symbol ':substring' on type 'PolyType'. From 16383f61a4a55ed000417eb7db786b8336e5839d Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Sat, 16 Dec 2023 17:07:43 +0000 Subject: [PATCH 2/4] Added SomeoneOnEarth to all source headers Give credit to a co-author. --- manifest.xml | 2 +- resources-ara/strings/strings.xml | 2 +- resources-bul/strings/strings.xml | 2 +- resources-ces/strings/strings.xml | 2 +- resources-dan/strings/strings.xml | 2 +- resources-deu/strings/corrections.xml | 2 +- resources-deu/strings/strings.xml | 2 +- resources-dut/strings/strings.xml | 2 +- resources-est/strings/strings.xml | 2 +- resources-fin/strings/strings.xml | 2 +- resources-fre/strings/corrections.xml | 2 +- resources-fre/strings/strings.xml | 2 +- resources-gre/strings/strings.xml | 2 +- resources-heb/strings/strings.xml | 2 +- resources-hrv/strings/strings.xml | 2 +- resources-hun/strings/strings.xml | 2 +- resources-ind/strings/strings.xml | 2 +- resources-ita/strings/strings.xml | 2 +- resources-jpn/strings/strings.xml | 2 +- resources-kor/strings/strings.xml | 2 +- resources-launcher-26-26/drawables.xml | 2 +- resources-launcher-30-30/drawables.xml | 2 +- resources-launcher-35-35/drawables.xml | 2 +- resources-launcher-36-36/drawables.xml | 2 +- resources-launcher-40-40/drawables.xml | 2 +- resources-launcher-54-54/drawables.xml | 2 +- resources-launcher-60-60/drawables.xml | 2 +- resources-launcher-61-61/drawables.xml | 2 +- resources-launcher-62-62/drawables.xml | 2 +- resources-launcher-65-65/drawables.xml | 2 +- resources-launcher-70-70/drawables.xml | 2 +- resources-launcher-80-80/drawables.xml | 2 +- resources-lav/strings/strings.xml | 2 +- resources-lit/strings/strings.xml | 2 +- resources-nob/strings/strings.xml | 2 +- resources-pol/strings/strings.xml | 2 +- resources-por/strings/strings.xml | 2 +- resources-ron/strings/strings.xml | 2 +- resources-slo/strings/strings.xml | 2 +- resources-slv/strings/strings.xml | 2 +- resources-spa/strings/strings.xml | 2 +- resources-swe/strings/strings.xml | 2 +- resources-tha/strings/strings.xml | 2 +- resources-tur/strings/strings.xml | 2 +- resources-ukr/strings/strings.xml | 2 +- resources-vie/strings/strings.xml | 2 +- resources-zhs/strings/strings.xml | 2 +- resources-zht/strings/strings.xml | 2 +- resources-zsm/strings/strings.xml | 2 +- resources/settings/properties.xml | 2 +- resources/settings/settings.xml | 2 +- resources/strings/strings.xml | 2 +- source/Globals.mc | 2 +- source/HomeAssistantApp.mc | 2 +- source/HomeAssistantIconMenuItem.mc | 2 +- source/HomeAssistantMenuItem.mc | 2 +- source/HomeAssistantToggleMenuItem.mc | 2 +- source/HomeAssistantView.mc | 2 +- source/HomeAssistantViewMenuItem.mc | 2 +- 59 files changed, 59 insertions(+), 59 deletions(-) diff --git a/manifest.xml b/manifest.xml index 6c011ed..531d78b 100644 --- a/manifest.xml +++ b/manifest.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 Test Application id="98c36259-498a-4458-9cef-74a273ad2bc3" Live Application id="40131e87-31ff-454b-a8e2-92276ee399d6" diff --git a/resources-ara/strings/strings.xml b/resources-ara/strings/strings.xml index c878246..9baeafa 100644 --- a/resources-ara/strings/strings.xml +++ b/resources-ara/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-bul/strings/strings.xml b/resources-bul/strings/strings.xml index 8704b02..326db8c 100644 --- a/resources-bul/strings/strings.xml +++ b/resources-bul/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-ces/strings/strings.xml b/resources-ces/strings/strings.xml index 6bc14ee..9f98571 100644 --- a/resources-ces/strings/strings.xml +++ b/resources-ces/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-dan/strings/strings.xml b/resources-dan/strings/strings.xml index 066d3a4..b05641d 100644 --- a/resources-dan/strings/strings.xml +++ b/resources-dan/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-deu/strings/corrections.xml b/resources-deu/strings/corrections.xml index 8d8810c..ed0cdd1 100644 --- a/resources-deu/strings/corrections.xml +++ b/resources-deu/strings/corrections.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 14 November 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 14 November 2023 --> diff --git a/resources-deu/strings/strings.xml b/resources-deu/strings/strings.xml index a5628c4..3095b6c 100644 --- a/resources-deu/strings/strings.xml +++ b/resources-deu/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-dut/strings/strings.xml b/resources-dut/strings/strings.xml index e3867ed..d319311 100644 --- a/resources-dut/strings/strings.xml +++ b/resources-dut/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-est/strings/strings.xml b/resources-est/strings/strings.xml index 61f1886..94ae153 100644 --- a/resources-est/strings/strings.xml +++ b/resources-est/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-fin/strings/strings.xml b/resources-fin/strings/strings.xml index 93fd3b8..12143a4 100644 --- a/resources-fin/strings/strings.xml +++ b/resources-fin/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-fre/strings/corrections.xml b/resources-fre/strings/corrections.xml index b75db29..a9be4eb 100644 --- a/resources-fre/strings/corrections.xml +++ b/resources-fre/strings/corrections.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 14 November 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 14 November 2023 --> diff --git a/resources-fre/strings/strings.xml b/resources-fre/strings/strings.xml index 71dabe2..be42a29 100644 --- a/resources-fre/strings/strings.xml +++ b/resources-fre/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-gre/strings/strings.xml b/resources-gre/strings/strings.xml index 965adae..5f7413f 100644 --- a/resources-gre/strings/strings.xml +++ b/resources-gre/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-heb/strings/strings.xml b/resources-heb/strings/strings.xml index ff5d53c..0af6cf6 100644 --- a/resources-heb/strings/strings.xml +++ b/resources-heb/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-hrv/strings/strings.xml b/resources-hrv/strings/strings.xml index f146d63..d252106 100644 --- a/resources-hrv/strings/strings.xml +++ b/resources-hrv/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-hun/strings/strings.xml b/resources-hun/strings/strings.xml index 82d7395..03dbc06 100644 --- a/resources-hun/strings/strings.xml +++ b/resources-hun/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-ind/strings/strings.xml b/resources-ind/strings/strings.xml index a4ab5c5..777f06c 100644 --- a/resources-ind/strings/strings.xml +++ b/resources-ind/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-ita/strings/strings.xml b/resources-ita/strings/strings.xml index 57fd138..7155eea 100644 --- a/resources-ita/strings/strings.xml +++ b/resources-ita/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-jpn/strings/strings.xml b/resources-jpn/strings/strings.xml index cfbbcae..3f52116 100644 --- a/resources-jpn/strings/strings.xml +++ b/resources-jpn/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-kor/strings/strings.xml b/resources-kor/strings/strings.xml index b696aad..b9e0fd2 100644 --- a/resources-kor/strings/strings.xml +++ b/resources-kor/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-26-26/drawables.xml b/resources-launcher-26-26/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-26-26/drawables.xml +++ b/resources-launcher-26-26/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-30-30/drawables.xml b/resources-launcher-30-30/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-30-30/drawables.xml +++ b/resources-launcher-30-30/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-35-35/drawables.xml b/resources-launcher-35-35/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-35-35/drawables.xml +++ b/resources-launcher-35-35/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-36-36/drawables.xml b/resources-launcher-36-36/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-36-36/drawables.xml +++ b/resources-launcher-36-36/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-40-40/drawables.xml b/resources-launcher-40-40/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-40-40/drawables.xml +++ b/resources-launcher-40-40/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-54-54/drawables.xml b/resources-launcher-54-54/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-54-54/drawables.xml +++ b/resources-launcher-54-54/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-60-60/drawables.xml b/resources-launcher-60-60/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-60-60/drawables.xml +++ b/resources-launcher-60-60/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-61-61/drawables.xml b/resources-launcher-61-61/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-61-61/drawables.xml +++ b/resources-launcher-61-61/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-62-62/drawables.xml b/resources-launcher-62-62/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-62-62/drawables.xml +++ b/resources-launcher-62-62/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-65-65/drawables.xml b/resources-launcher-65-65/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-65-65/drawables.xml +++ b/resources-launcher-65-65/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-70-70/drawables.xml b/resources-launcher-70-70/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-70-70/drawables.xml +++ b/resources-launcher-70-70/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-launcher-80-80/drawables.xml b/resources-launcher-80-80/drawables.xml index d8b5369..4f18f5a 100644 --- a/resources-launcher-80-80/drawables.xml +++ b/resources-launcher-80-80/drawables.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-lav/strings/strings.xml b/resources-lav/strings/strings.xml index c4310f5..57fdaa4 100644 --- a/resources-lav/strings/strings.xml +++ b/resources-lav/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-lit/strings/strings.xml b/resources-lit/strings/strings.xml index 0a226a7..ad70541 100644 --- a/resources-lit/strings/strings.xml +++ b/resources-lit/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-nob/strings/strings.xml b/resources-nob/strings/strings.xml index f05d71c..844a7b0 100644 --- a/resources-nob/strings/strings.xml +++ b/resources-nob/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-pol/strings/strings.xml b/resources-pol/strings/strings.xml index 68e9eaf..ddf55d5 100644 --- a/resources-pol/strings/strings.xml +++ b/resources-pol/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-por/strings/strings.xml b/resources-por/strings/strings.xml index f564fbb..5aec7eb 100644 --- a/resources-por/strings/strings.xml +++ b/resources-por/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-ron/strings/strings.xml b/resources-ron/strings/strings.xml index df5ab8f..e5cad0e 100644 --- a/resources-ron/strings/strings.xml +++ b/resources-ron/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-slo/strings/strings.xml b/resources-slo/strings/strings.xml index 036c04b..3ca1a0c 100644 --- a/resources-slo/strings/strings.xml +++ b/resources-slo/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-slv/strings/strings.xml b/resources-slv/strings/strings.xml index 55ae72d..1e4e0de 100644 --- a/resources-slv/strings/strings.xml +++ b/resources-slv/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-spa/strings/strings.xml b/resources-spa/strings/strings.xml index 5d5397a..85b9600 100644 --- a/resources-spa/strings/strings.xml +++ b/resources-spa/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-swe/strings/strings.xml b/resources-swe/strings/strings.xml index 8daf71f..b4adbb2 100644 --- a/resources-swe/strings/strings.xml +++ b/resources-swe/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-tha/strings/strings.xml b/resources-tha/strings/strings.xml index c1e8db1..f98b391 100644 --- a/resources-tha/strings/strings.xml +++ b/resources-tha/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-tur/strings/strings.xml b/resources-tur/strings/strings.xml index 850dce9..de46b52 100644 --- a/resources-tur/strings/strings.xml +++ b/resources-tur/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-ukr/strings/strings.xml b/resources-ukr/strings/strings.xml index b79b976..f94e84f 100644 --- a/resources-ukr/strings/strings.xml +++ b/resources-ukr/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-vie/strings/strings.xml b/resources-vie/strings/strings.xml index d6769c6..58fde47 100644 --- a/resources-vie/strings/strings.xml +++ b/resources-vie/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-zhs/strings/strings.xml b/resources-zhs/strings/strings.xml index ae2d75d..84d3e93 100644 --- a/resources-zhs/strings/strings.xml +++ b/resources-zhs/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-zht/strings/strings.xml b/resources-zht/strings/strings.xml index 3950bab..5db31af 100644 --- a/resources-zht/strings/strings.xml +++ b/resources-zht/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources-zsm/strings/strings.xml b/resources-zsm/strings/strings.xml index c0c505c..f06133f 100644 --- a/resources-zsm/strings/strings.xml +++ b/resources-zsm/strings/strings.xml @@ -9,7 +9,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources/settings/properties.xml b/resources/settings/properties.xml index 102efc1..8929de2 100644 --- a/resources/settings/properties.xml +++ b/resources/settings/properties.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources/settings/settings.xml b/resources/settings/settings.xml index 638194d..753f7a4 100644 --- a/resources/settings/settings.xml +++ b/resources/settings/settings.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/resources/strings/strings.xml b/resources/strings/strings.xml index ea590e7..3d2ce56 100644 --- a/resources/strings/strings.xml +++ b/resources/strings/strings.xml @@ -8,7 +8,7 @@ tested on a Venu 2 device. The source code is provided at: https://github.com/house-of-abbey/GarminHomeAssistant. - P A Abbey & J D Abbey, 31 October 2023 + P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 --> diff --git a/source/Globals.mc b/source/Globals.mc index 9475c94..bd2ed2d 100644 --- a/source/Globals.mc +++ b/source/Globals.mc @@ -9,7 +9,7 @@ // tested on a Venu 2 device. The source code is provided at: // https://github.com/house-of-abbey/GarminHomeAssistant. // -// P A Abbey & J D Abbey, 31 October 2023 +// P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 // // // Description: diff --git a/source/HomeAssistantApp.mc b/source/HomeAssistantApp.mc index fe862e8..f7dd0c0 100644 --- a/source/HomeAssistantApp.mc +++ b/source/HomeAssistantApp.mc @@ -9,7 +9,7 @@ // tested on a Venu 2 device. The source code is provided at: // https://github.com/house-of-abbey/GarminHomeAssistant. // -// P A Abbey & J D Abbey, 31 October 2023 +// P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 // // // Description: diff --git a/source/HomeAssistantIconMenuItem.mc b/source/HomeAssistantIconMenuItem.mc index a42055d..80375b1 100644 --- a/source/HomeAssistantIconMenuItem.mc +++ b/source/HomeAssistantIconMenuItem.mc @@ -9,7 +9,7 @@ // tested on a Venu 2 device. The source code is provided at: // https://github.com/house-of-abbey/GarminHomeAssistant. // -// P A Abbey & J D Abbey, 31 October 2023 +// P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 // // // Description: diff --git a/source/HomeAssistantMenuItem.mc b/source/HomeAssistantMenuItem.mc index 8b4166e..d8e0f4c 100644 --- a/source/HomeAssistantMenuItem.mc +++ b/source/HomeAssistantMenuItem.mc @@ -9,7 +9,7 @@ // tested on a Venu 2 device. The source code is provided at: // https://github.com/house-of-abbey/GarminHomeAssistant. // -// P A Abbey & J D Abbey, 31 October 2023 +// P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 // // // Description: diff --git a/source/HomeAssistantToggleMenuItem.mc b/source/HomeAssistantToggleMenuItem.mc index a862663..08b2fbe 100644 --- a/source/HomeAssistantToggleMenuItem.mc +++ b/source/HomeAssistantToggleMenuItem.mc @@ -9,7 +9,7 @@ // tested on a Venu 2 device. The source code is provided at: // https://github.com/house-of-abbey/GarminHomeAssistant. // -// P A Abbey & J D Abbey, 31 October 2023 +// P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 // // // Description: diff --git a/source/HomeAssistantView.mc b/source/HomeAssistantView.mc index 366dcac..5136290 100644 --- a/source/HomeAssistantView.mc +++ b/source/HomeAssistantView.mc @@ -9,7 +9,7 @@ // tested on a Venu 2 device. The source code is provided at: // https://github.com/house-of-abbey/GarminHomeAssistant. // -// P A Abbey & J D Abbey, 31 October 2023 +// P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 // // // Description: diff --git a/source/HomeAssistantViewMenuItem.mc b/source/HomeAssistantViewMenuItem.mc index c430b4b..81fd141 100644 --- a/source/HomeAssistantViewMenuItem.mc +++ b/source/HomeAssistantViewMenuItem.mc @@ -9,7 +9,7 @@ // tested on a Venu 2 device. The source code is provided at: // https://github.com/house-of-abbey/GarminHomeAssistant. // -// P A Abbey & J D Abbey, 31 October 2023 +// P A Abbey & J D Abbey & SomeoneOnEarth, 31 October 2023 // // // Description: From 091cc7c2fe1b67a9f213e9ece7b2fa80f1f87a2f Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Sun, 17 Dec 2023 11:57:43 +0000 Subject: [PATCH 3/4] Update HomeAssistantService.mc Amended comment. --- source/HomeAssistantService.mc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/HomeAssistantService.mc b/source/HomeAssistantService.mc index 6b2b905..c88615c 100644 --- a/source/HomeAssistantService.mc +++ b/source/HomeAssistantService.mc @@ -122,7 +122,7 @@ class HomeAssistantService { } ErrorView.show(strNoInternet + "."); } else { - // Can't user null for parameters due to API version level. + // Can't use null for substring() parameters due to API version level. var url = (Properties.getValue("api_url") as Lang.String) + "/services/" + service.substring(0, service.find(".")) + "/" + service.substring(service.find(".")+1, service.length()); if (Globals.scDebug) { System.println("HomeAssistantService call() URL=" + url); From 19be6c28ed1e5e2a4be3e720856b969d361ea593 Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Sun, 17 Dec 2023 12:10:52 +0000 Subject: [PATCH 4/4] Update ErrorView.mc Removed commented out code. --- source/ErrorView.mc | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/ErrorView.mc b/source/ErrorView.mc index ff44ba3..0c5c5c8 100644 --- a/source/ErrorView.mc +++ b/source/ErrorView.mc @@ -129,11 +129,9 @@ class ErrorView extends ScalableView { } class ErrorDelegate extends WatchUi.BehaviorDelegate { - //private var mView as ErrorView; function initialize(view as ErrorView) { WatchUi.BehaviorDelegate.initialize(); - //mView = view; } function onBack() {