mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-05-01 05:02:34 +00:00
Update Settings.mc
Test the phone is connected before attempting WebHook HTTP requests.
This commit is contained in:
@ -70,6 +70,7 @@ class Settings {
|
||||
// Manage this inside the application or widget only (not a glance or background service process)
|
||||
if (mIsApp) {
|
||||
if (mHasService) {
|
||||
if (System.getDeviceSettings().phoneConnected) {
|
||||
mWebhookManager = new WebhookManager();
|
||||
if (getWebhookId().equals("")) {
|
||||
// System.println("Settings update(): Doing full webhook & sensor creation.");
|
||||
@ -107,6 +108,9 @@ class Settings {
|
||||
unsetIsSensorsLevelEnabled();
|
||||
unsetWebhookId();
|
||||
}
|
||||
} else {
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String);
|
||||
}
|
||||
}
|
||||
// System.println("Settings update(): getTemporalEventRegisteredTime() = " + Background.getTemporalEventRegisteredTime());
|
||||
// if (Background.getTemporalEventRegisteredTime() != null) {
|
||||
|
Reference in New Issue
Block a user