MqttTopicFinderViewModel
class MqttTopicFinderViewModel(reverseGeocoder: ReverseGeocoder, locationService: LocationService, mqttRootsRepository: MqttRootsRepository) : ViewModel(source)
Samples the broker for the root topics in use and builds the suggestions for where the user is. The radio's own fix comes first and the phone's location is the fallback, read only when permission is already granted.
Constructors
Link copied to clipboard
constructor(reverseGeocoder: ReverseGeocoder, locationService: LocationService, mqttRootsRepository: MqttRootsRepository)
Types
Link copied to clipboard
data class UiState(val regionName: String? = null, val place: GeocodedPlace? = null, val location: LatLon? = null, val locating: Boolean = false, val geocodeFailed: Boolean = false, val sample: MqttTopicSampler.State = MqttTopicSampler.State(), val directory: MqttRootDirectory = MqttRootDirectory.EMPTY)