[Android MainUI App/openHab UI] reload on Smartphone rotation

Hi!

I’ve observed a strange behaviour that drives me nuts and makes me thing to migrate to HomeAssistant. I still hope for a solution so I’ll ask here.

Besides I’m not satisfied with the android integration overall, every time I rotate the Android device the main ui reloads and returns to the overview page. I expect that the app stays at least on the same page. Better would be to see (most) of the elements that were visible before rotation. I’ve added two screenshots for visualisation.

Vertical orientation with page “Standorte” [locations]:

After 90° rotation/horizontal orientation with page “Übersicht”[overview]

The return to overview is 100% reproducible with all pages (not only the 4 standard main-ui pages).

Does anybody have a clue what went wrong here?

I’ve got the App running on an android device.
Appversion 3.7.0
Galaxy S20 with Android 13.
Openhab running with 3.4.0.

Best regards

See the discussion on this in this issue report. The reloading essentially is a limitation of the WebView component in Android.
@ysc Would it be possible for MainUI to support us here by memorizing the currently active tab via query parameter, fragment or something?

I tried that initially when working on that home page (3/4 years ago already!) with Routable Tabs but it didn’t work out, there were problems, so I abandoned the idea in the end. Maybe it’s time to revisit it.