mirror of
				https://github.com/house-of-abbey/GarminHomeAssistant.git
				synced 2025-10-30 23:38:15 +00:00 
			
		
		
		
	Added update to telemetry on completion of an activity
This commit is contained in:
		| @@ -95,9 +95,11 @@ class Settings { | ||||
|                     if ((Background.getTemporalEventRegisteredTime() == null) or | ||||
|                         (Background.getTemporalEventRegisteredTime() != (mBatteryRefreshRate * 60))) { | ||||
|                         Background.registerForTemporalEvent(new Time.Duration(mBatteryRefreshRate * 60)); // Convert to seconds | ||||
|                         Background.registerForActivityCompletedEvent(); | ||||
|                     } | ||||
|                 } else if (Background.getTemporalEventRegisteredTime() != null) { | ||||
|                     Background.deleteTemporalEvent(); | ||||
|                     Background.deleteActivityCompletedEvent(); | ||||
|                 } | ||||
|             } else { | ||||
|                 // Explicitly disable the background event which persists when the application closes. | ||||
| @@ -182,6 +184,7 @@ class Settings { | ||||
|         Properties.setValue("enable_battery_level", mIsSensorsLevelEnabled); | ||||
|         if (mHasService and (Background.getTemporalEventRegisteredTime() != null)) { | ||||
|             Background.deleteTemporalEvent(); | ||||
|             Background.deleteActivityCompletedEvent(); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user