-
-
Notifications
You must be signed in to change notification settings - Fork 812
Add onboarding deeplinks (invite and redirect) #5818
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
Conversation
Test Results 85 files 85 suites 9m 0s ⏱️ Results for commit 8f88829. ♻️ This comment has been updated with latest results. |
ac43843
to
06a983a
Compare
8191b55
to
c122909
Compare
b6431c6
to
d178aa2
Compare
4330690
to
56def5b
Compare
d178aa2
to
4a154b9
Compare
ae70e11
to
c31a2c1
Compare
eb52415
to
0600d75
Compare
0600d75
to
ab1fc28
Compare
onboarding/src/main/kotlin/io/homeassistant/companion/android/launcher/LauncherActivity.kt
Outdated
Show resolved
Hide resolved
Testing LinkActivity: while comparing the current production app and this version, this version is noticeably slower than production and has a weird flash at the top of the screen. Both are cold starts (app removed from recents). Current prod: deeplink-old.mp4This version with new deeplinks: deeplink-new.mp4 |
ab1fc28
to
8f88829
Compare
After discussion on Discord, I tested a debug build of the latest commit of main and performance/behavior for deeplinks seems similar to this PR branch, so the observed difference is probably because of debug and not the changes in this PR. deeplink-main.mp4 |
Summary
LauncherActivity
now can be started with aDeepLink
sealed interface instance. For now it only support Invite and NavigateTo. I decided to keep theLinkActivity
to handle the server selection and potential modification/validation of the data received on the app.The current state of the navigation framework doesn't allow us to use the
deeplink
capability since it has too many restrictions. So for now everything is using the startDestination. Unfortunately the sub-navigation-graph cannot read the value from the startDestination, that's why I passed aserverToOnboard
parameter to theOnbardingNavigation
instead of simply using the route. IMO it is also a valid pattern that I'm going to use to morph the onboarding graph for the wear.I fixed an issue where when we open the Frontend from the Launcher it was keeping the Launcher in the backstack with a white screen. For now it is a workaround with a dummy route that doesn't do anything except redirecting to the activity and finish the current activity. Later we are going to remove this once the WebViewActivity is using the navigation framework.
Checklist
Any other notes
For now the
homeassistant://navigate
links are still handled by the WebViewActivity directly.