Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve phone feedback for Wear onboarding #3450

Merged

Conversation

jpelgrom
Copy link
Member

@jpelgrom jpelgrom commented Apr 2, 2023

Summary

Improve the (perceived) responsiveness of onboarding a watch via the phone by showing a loading indicator after submitting to indicate it's doing something, and Snackbars for success/error.

On failure, sending the stacktrace over to the phone is also useful, for now I'm just printing to the log. Example:

2023-04-02 17:14:16.333 22245-22245 SettingsWearViewModel   io....stant.companion.android.debug  E  Watch was unable to register: java.lang.Exception
                                                                                                    	at io.homeassistant.companion.android.phone.PhoneSettingsListener$login$1.invokeSuspend(PhoneSettingsListener.kt:148)
                                                                                                    	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                                                                                                    	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:938)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at android.os.Looper.loop(Looper.java:223)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:7651)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Screenshots

Before (stable):

onboard-old.mp4

After (this PR):

onboard-new.mp4

Link to pull request in Documentation repository

n/a

Any other notes

Onboarding speed depends on the connection, sometimes it completes in less than a second while other times I'm waiting close to 10 seconds - obviously these improvements will be most interesting in the latter case.

 - Show a loading indicator after sending data
 - Show a Snackbar for success/errors
@JBassett JBassett merged commit 75c7c08 into home-assistant:master Apr 3, 2023
3 checks passed
@jpelgrom jpelgrom deleted the wear-phone-onboarding-feedback branch April 3, 2023 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants