Describe the solution you'd like
During orientation change the VssSpecificationListeners are unsubscribed, dropped, re-created and subscribed again to get into a valid state again.
Instead of unsubscribing and re-subscribing the listener (and other) stateful properties should be moved into the application or viewModel to make sure, that they survive the re-creation of the MainActivity which happens during the orientation change.
Additional context
move all stateful properties into the application or the corresponding viewModels
remove the now redundant call to onConnected callback in MainActivity#connectToDataBroker - it was just used subscribe the previously unsubscribed listeners again - this should not be required if all objects are kept alive
Describe the solution you'd like During orientation change the VssSpecificationListeners are unsubscribed, dropped, re-created and subscribed again to get into a valid state again.
Instead of unsubscribing and re-subscribing the listener (and other) stateful properties should be moved into the application or viewModel to make sure, that they survive the re-creation of the MainActivity which happens during the orientation change.
Additional context