Automatically advance setup wizard on WiFi connection #92
Automatically advance setup wizard on WiFi connection #92
Conversation
Looks like one of the test cases ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also check if this is the currently active page, else re-connections will cause the next pages to be skipped.
Another tip, you can check if the page is visible or not using the |
Does the Sorry for the inactivity; currently on my other partition. I'll probably switch back to Ubuntu to test this soon. |
The |
Added additional condition that Performed the following tests and observed the following behavior by turning the personal hotspot on my other phone on and off at various times:
It's worth noting that due to the network refresh rate, networks that suddenly become available like in this test will not immediately appear. I had to wait a few seconds for the device to connect to my hotspot after I turned it on while on the WiFi screen. But this seems like an unlikely scenario for most end users. |
While testing in a device with a SIM inserted, I realized another problem -- any data connection triggers Something must know if Wi-Fi is connected or not, since updates only check over Wi-Fi. Let's investigate more... |
On further investigation (read: poking Rodney), |
Gotcha. Added the extra condition for WiFi connections. I can confirm that connecting to a network still skips the network selection screen (specifically the fourth scenario in my last comment). Unfortunately I don't have a SIM card in my device so I can't check mobile data connections. |
Oh, I didn't think of putting it there! That fixes a new bug that I would have introduced were I making the changes. That condition also needs to be added to |
Out of curiosity (and also for a better understanding of the code), where were you thinking of making the changes and what was the bug? |
This page gets automatically skipped whenever you are connected to any network because the You don't have to change it if you don't want to, but I'd appreciate it. |
I see. I changed |
Alright, now I see what's going on here better. |
I must admit I'm not sure what the necessary change is. I'm assuming for readability, it shouldn't include What am I missing? |
|
That's very weird because the page got skipped on my device when it was connected before reaching the network selection screen. I'll try testing it again tonight. |
Tested by turning on the hotspot on my other phone while the language selection screen was present. The device connected automatically to the network and after hitting "skip" on the "no SIM card" screen, it jumped straight to the time zone selection. How might I be able to debug this? |
Oh, that's a strange behavior. Pages get set to So yes, you're right, this works normally... however it relies on |
Makes sense. Future-proofing the condition it is then, in case a future version doesn't set visible to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And after all that, it seems like Connectivity.limitedBandwidth
doesn't actually become true when connected to 4G... oh well, that's no reason to keep this from the codebase any longer. The skip condition works as designed, as does the automatic advance.
Thank you so, so much for working with me on this. I've learned a lot about the Wizard.
Would you like to be mentioned by name (as listed on GitHub) in our changelog? The changelog will appear on the post releasing OTA-9, similar to the OTA-8 post: https://ubports.com/blog/ubports-blog-1/post/ubuntu-touch-ota-8-release-207 |
Employs the fix suggested by @UniversalSuperBox to automatically advance the setup wizard once a connection to a WiFi network is established.
It's been a pleasure. Thanks to you as well for all the input! And coming up with the original fix :) Hopefully with this as a base I might be able to better understand the codebase and make more significant contributions in the future. Per the changelog: It'd be an honor to be mentioned. Thanks! |
Employs the fix suggested by @UniversalSuperBox to automatically advance the setup wizard once a connection to a WiFi network is established.
Employs the fix suggested by @UniversalSuperBox to automatically advance the setup wizard once a connection to a WiFi network is established.
Tested by editing the file locally and re-running the setup wizard on Nexus 5 (hammerhead) running 16.04 (2019-01-11),
devel
channel.Closes ubports/ubuntu-touch#845.