diff --git a/CHANGELOG.md b/CHANGELOG.md index aad43fa417..2cce255df9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Hebrew Translation (thanks to Ahiel and Natan) - Dutch Translation (thanks to all contributors) - Setting a preference that doesn't actually change the value won't have any effects (such as MQTT reconnecting) (#1875) +- Status messages contain the app version and flavour ### Bug fixes diff --git a/project/app/src/main/java/org/owntracks/android/model/messages/MessageStatus.kt b/project/app/src/main/java/org/owntracks/android/model/messages/MessageStatus.kt index 8e044a0b5d..7aabd48543 100644 --- a/project/app/src/main/java/org/owntracks/android/model/messages/MessageStatus.kt +++ b/project/app/src/main/java/org/owntracks/android/model/messages/MessageStatus.kt @@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonInclude import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonTypeInfo +import org.owntracks.android.BuildConfig import org.owntracks.android.preferences.Preferences @JsonTypeInfo( @@ -47,4 +48,8 @@ class AddMessageStatus { @JsonProperty("hib") var appHibernation = 0 @JsonProperty("loc") var locationPermission = 0 + + @JsonProperty("version") var version = BuildConfig.VERSION_CODE + + @JsonProperty("flavour") var flavour = BuildConfig.FLAVOR } diff --git a/project/app/src/main/java/org/owntracks/android/services/LocationProcessor.kt b/project/app/src/main/java/org/owntracks/android/services/LocationProcessor.kt index d0bdc563d4..4612bf003e 100644 --- a/project/app/src/main/java/org/owntracks/android/services/LocationProcessor.kt +++ b/project/app/src/main/java/org/owntracks/android/services/LocationProcessor.kt @@ -248,7 +248,7 @@ constructor( } fun publishStatusMessage() { - // Getting appHibernation takes a while, so lets not block the main thrad + // Getting appHibernation takes a while, so lets not block the main thread scope.launch(ioDispatcher) { messageProcessor.queueMessageForSending( MessageStatus().apply {