Add set security level when not set while opening a server#6097
Add set security level when not set while opening a server#6097
Conversation
app/src/main/kotlin/io/homeassistant/companion/android/webview/WebViewPresenter.kt
Outdated
Show resolved
Hide resolved
jpelgrom
left a comment
There was a problem hiding this comment.
Do you have a good way to test this without manually editing the app code to skip this step? 😅
Why is there an up arrow if we want the user to choose before continuing?
app/src/main/kotlin/io/homeassistant/companion/android/webview/WebViewActivity.kt
Outdated
Show resolved
Hide resolved
Not really unfortunately ... I did tweak the code, you could also use a different version of the app without the flag (before the new onboarding like 2025.8.7)
Well we had a long disussion with @bgoncal about this screen being optional, he made it optional on iOS with a cross. If the user close it with the cross it's going to be shown again when opening the app again next time. At first I wanted to make this mandatory but I get the point that a user might just want to do something quick in the app and doesn't have the time to read. |
* Request battery optimization permission when leaving Location screens * Remove battery optimization for LocationForSecureConnectionScreen * Cleanup * Fix crash on Android 6 with Github icon * Apply suggestion
|
Easiest way I found to test: onboard using https url which doesn't set the preference, then change it to http afterwards.
OK, I see how not forcing but showing it every time until a choice is made is nice. However, maybe we should also show a close/cross button in this situation to make that more obvious? It's not uncommon for Android apps to have that as the first icon in the top app bar. (I'm also thinking of a redesigned frontend timeout screen, where you want a close instead of up button.) |
bf162f7 to
91753f8
Compare
What do you mean? I'm going to make it a cross instead, to make it simpler is it fine for you to also use a cross when the fragment is opened from the settings too? |
My assumption was that you were working on replacing the frontend timeout pop-up with a full screen dialog that guides the user more on how to fix it like iOS / the onboarding connection error screen? In that one I'd expect a top app bar with a refresh or close icon in the top left.
Well in the settings screen an up arrow makes more sense 😅 not a dialog but a normal full screen in that case |
I'm going to do this once we drop the WebViewActivity not before.
🥲 I'm going to handle both cases on Wednesday. |
|
Done 👍🏻 |
This still hasn't been addressed. |
I thought I did by checking if a fragment is displayed when calling wait for connection. But maybe I'm wrong and the fragment is not displayed anymore. |
@jpelgrom I'm curious about how to reproducing it, because I've added some logs and I can see that
|
I've just tried reproducing it again and I'm also unable to with the latest commit on this branch. Maybe I broke something with a manual edit or it was fixed in a later commit. Sorry to keep you waiting, in case this turned out to be a real issue we'll surely encounter it again after merging. |
Summary
This PR is going to show the ConnectionSecurityLevelFragment if the current server has a plain text URL in its URLs and the allowInsecure flag is not set yet.
Checklist