mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-05-03 22:22:27 +00:00
Amended display of "no Internet" errors
This commit is contained in:
41
manifest.xml
41
manifest.xml
@ -11,21 +11,24 @@
|
|||||||
|
|
||||||
P A Abbey & J D Abbey, 31 October 2023
|
P A Abbey & J D Abbey, 31 October 2023
|
||||||
|
|
||||||
|
Test Application id="98c36259-498a-4458-9cef-74a273ad2bc3"
|
||||||
|
Live Application id="40131e87-31ff-454b-a8e2-92276ee399d6"
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<iq:manifest version="3" xmlns:iq="http://www.garmin.com/xml/connectiq">
|
<iq:manifest version="3" xmlns:iq="http://www.garmin.com/xml/connectiq">
|
||||||
<!--
|
<!--
|
||||||
Use "Monkey C: Edit Application" from the Visual Studio Code command palette
|
Use "Monkey C: Edit Application" from the Visual Studio Code command palette
|
||||||
to update the application attributes.
|
to update the application attributes.
|
||||||
-->
|
-->
|
||||||
<iq:application id="98c36259-498a-4458-9cef-74a273ad2bc3" type="watch-app" name="@Strings.AppName" entry="HomeAssistantApp" launcherIcon="@Drawables.LauncherIcon" minApiLevel="3.3.0">
|
<iq:application id="98c36259-498a-4458-9cef-74a273ad2bc3" type="watch-app" name="@Strings.AppName" entry="HomeAssistantApp" launcherIcon="@Drawables.LauncherIcon" minApiLevel="3.3.0">
|
||||||
<!--
|
<!--
|
||||||
Use the following from the Visual Studio Code comand palette to edit
|
Use the following from the Visual Studio Code comand palette to edit
|
||||||
the build targets:
|
the build targets:
|
||||||
"Monkey C: Set Products by Product Category" - Lets you add all products
|
"Monkey C: Set Products by Product Category" - Lets you add all products
|
||||||
that belong to the same product category
|
that belong to the same product category
|
||||||
"Monkey C: Edit Products" - Lets you add or remove any product
|
"Monkey C: Edit Products" - Lets you add or remove any product
|
||||||
-->
|
-->
|
||||||
<iq:products>
|
<iq:products>
|
||||||
<!-- Screen Size 416x416 launcher icon size 70x70 -->
|
<!-- Screen Size 416x416 launcher icon size 70x70 -->
|
||||||
<iq:product id="d2airx10"/>
|
<iq:product id="d2airx10"/>
|
||||||
@ -69,17 +72,17 @@
|
|||||||
<iq:product id="vivoactive4s"/>
|
<iq:product id="vivoactive4s"/>
|
||||||
</iq:products>
|
</iq:products>
|
||||||
<!--
|
<!--
|
||||||
Use "Monkey C: Edit Permissions" from the Visual Studio Code command
|
Use "Monkey C: Edit Permissions" from the Visual Studio Code command
|
||||||
palette to update permissions.
|
palette to update permissions.
|
||||||
-->
|
-->
|
||||||
<iq:permissions>
|
<iq:permissions>
|
||||||
<iq:uses-permission id="Communications"/>
|
<iq:uses-permission id="Communications"/>
|
||||||
<iq:uses-permission id="BluetoothLowEnergy"/>
|
<iq:uses-permission id="BluetoothLowEnergy"/>
|
||||||
</iq:permissions>
|
</iq:permissions>
|
||||||
<!--
|
<!--
|
||||||
Use "Monkey C: Edit Languages" from the Visual Studio Code command
|
Use "Monkey C: Edit Languages" from the Visual Studio Code command
|
||||||
palette to edit your compatible language list.
|
palette to edit your compatible language list.
|
||||||
-->
|
-->
|
||||||
<iq:languages>
|
<iq:languages>
|
||||||
<iq:language>ara</iq:language>
|
<iq:language>ara</iq:language>
|
||||||
<iq:language>bul</iq:language>
|
<iq:language>bul</iq:language>
|
||||||
@ -118,10 +121,10 @@
|
|||||||
<iq:language>ukr</iq:language>
|
<iq:language>ukr</iq:language>
|
||||||
<iq:language>vie</iq:language>
|
<iq:language>vie</iq:language>
|
||||||
</iq:languages>
|
</iq:languages>
|
||||||
<!--
|
<!--
|
||||||
Use "Monkey C: Configure Monkey Barrel" from the Visual Studio Code
|
Use "Monkey C: Configure Monkey Barrel" from the Visual Studio Code
|
||||||
command palette to edit the included barrels.
|
command palette to edit the included barrels.
|
||||||
-->
|
-->
|
||||||
<iq:barrels/>
|
<iq:barrels/>
|
||||||
</iq:application>
|
</iq:application>
|
||||||
</iq:manifest>
|
</iq:manifest>
|
@ -69,6 +69,11 @@ class HomeAssistantApp extends Application.AppBase {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
WatchUi.switchToView(haMenu, new HomeAssistantViewDelegate(), WatchUi.SLIDE_IMMEDIATE);
|
WatchUi.switchToView(haMenu, new HomeAssistantViewDelegate(), WatchUi.SLIDE_IMMEDIATE);
|
||||||
|
} else if (responseCode == -300) {
|
||||||
|
if (Globals.debug) {
|
||||||
|
System.println("HomeAssistantApp Note - onReturnFetchMenuConfig(): Network request timeout.");
|
||||||
|
}
|
||||||
|
WatchUi.pushView(new ErrorView(strNoMenu + ". " + strNoInternet + "?"), new ErrorDelegate(), WatchUi.SLIDE_UP);
|
||||||
} else {
|
} else {
|
||||||
if (Globals.debug) {
|
if (Globals.debug) {
|
||||||
System.println("HomeAssistantApp Note - onReturnFetchMenuConfig(): Configuration not found or potential validation issue.");
|
System.println("HomeAssistantApp Note - onReturnFetchMenuConfig(): Configuration not found or potential validation issue.");
|
||||||
@ -95,7 +100,7 @@ class HomeAssistantApp extends Application.AppBase {
|
|||||||
}
|
}
|
||||||
new Alert({
|
new Alert({
|
||||||
:timeout => Globals.alertTimeout,
|
:timeout => Globals.alertTimeout,
|
||||||
:font => Graphics.FONT_SYSTEM_MEDIUM,
|
:font => Graphics.FONT_SYSTEM_TINY,
|
||||||
:text => strNoInternet,
|
:text => strNoInternet,
|
||||||
:fgcolor => Graphics.COLOR_RED,
|
:fgcolor => Graphics.COLOR_RED,
|
||||||
:bgcolor => Graphics.COLOR_BLACK
|
:bgcolor => Graphics.COLOR_BLACK
|
||||||
|
@ -94,7 +94,7 @@ class HomeAssistantMenuItem extends WatchUi.MenuItem {
|
|||||||
}
|
}
|
||||||
new Alert({
|
new Alert({
|
||||||
:timeout => Globals.alertTimeout,
|
:timeout => Globals.alertTimeout,
|
||||||
:font => Graphics.FONT_SYSTEM_MEDIUM,
|
:font => Graphics.FONT_SYSTEM_TINY,
|
||||||
:text => strNoInternet,
|
:text => strNoInternet,
|
||||||
:fgcolor => Graphics.COLOR_RED,
|
:fgcolor => Graphics.COLOR_RED,
|
||||||
:bgcolor => Graphics.COLOR_BLACK
|
:bgcolor => Graphics.COLOR_BLACK
|
||||||
|
@ -101,7 +101,7 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
|
|||||||
}
|
}
|
||||||
new Alert({
|
new Alert({
|
||||||
:timeout => Globals.alertTimeout,
|
:timeout => Globals.alertTimeout,
|
||||||
:font => Graphics.FONT_SYSTEM_MEDIUM,
|
:font => Graphics.FONT_SYSTEM_TINY,
|
||||||
:text => strNoInternet,
|
:text => strNoInternet,
|
||||||
:fgcolor => Graphics.COLOR_RED,
|
:fgcolor => Graphics.COLOR_RED,
|
||||||
:bgcolor => Graphics.COLOR_BLACK
|
:bgcolor => Graphics.COLOR_BLACK
|
||||||
@ -165,7 +165,7 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
|
|||||||
}
|
}
|
||||||
new Alert({
|
new Alert({
|
||||||
:timeout => Globals.alertTimeout,
|
:timeout => Globals.alertTimeout,
|
||||||
:font => Graphics.FONT_SYSTEM_MEDIUM,
|
:font => Graphics.FONT_SYSTEM_TINY,
|
||||||
:text => strNoInternet,
|
:text => strNoInternet,
|
||||||
:fgcolor => Graphics.COLOR_RED,
|
:fgcolor => Graphics.COLOR_RED,
|
||||||
:bgcolor => Graphics.COLOR_BLACK
|
:bgcolor => Graphics.COLOR_BLACK
|
||||||
|
Reference in New Issue
Block a user