-
Notifications
You must be signed in to change notification settings - Fork 319
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
NN-843 #7349
NN-843 #7349
Changes from all commits
2fde58e
a3cbaab
d1e7735
125aff0
05af89f
e14c164
cc24d7a
76ea5a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- In case an app provides custom `Router` implementation to Nav SDK, the Nav SDK doesn't trigger `NavigationRouteAlternativesObserver` with online alternatives when current route is offline. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -471,7 +471,11 @@ class MapboxNavigation @VisibleForTesting internal constructor( | |
), | ||
navigationOptions.accessToken ?: "", | ||
if (moduleRouter.isInternalImplementation()) { | ||
nativeRouter | ||
// We pass null to let NN know that default router is used and it can rely | ||
// on implementation details in some cases like offline-online switch. | ||
// Meanwhile platform SDK uses its own instance of native router for | ||
// route requests | ||
null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We also pass nativeRouter in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice one! fixing in a followup PR There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} else { | ||
RouterInterfaceAdapter(moduleRouter, ::getNavigationRoutes) | ||
}, | ||
|
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.
Is it really so? I thought it was more like "it's triggered, but much later". The alternatives mechanism is still working, right? we just won't trigger an alternative request as soon as the network is back.
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.
@averkhaturau, can you please clarify consequences of using custom router for offline-online switch?
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.
NN knows which router is online only if it creates the routers itself. Providing a custom router makes this information unavailable, we don't know how to create an online router anymore. That's why the back online feature will not be available with a custom router