-
Notifications
You must be signed in to change notification settings - Fork 46
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
Migration from MapboxNavigationProvider
to MapboxNavigationApp
#129
base: main
Are you sure you want to change the base?
Conversation
app/src/main/java/com/mapbox/navigation/examples/alternative/ShowAlternativeRoutesActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/mapbox/navigation/examples/alternative/ShowAlternativeRoutesActivity.kt
Outdated
Show resolved
Hide resolved
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.
I also noticed that both of the migrated examples are crashing because of trying to access application context in activity constructor.
app/src/main/java/com/mapbox/navigation/examples/alternative/ShowAlternativeRoutesActivity.kt
Outdated
Show resolved
Hide resolved
Oh right, meant to use |
Another example for setting up something like MapboxNavigationApp The |
app/src/main/java/com/mapbox/navigation/examples/alternative/ShowAlternativeRoutesActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/mapbox/navigation/examples/alternative/ShowAlternativeRoutesActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/mapbox/navigation/examples/MainActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/mapbox/navigation/examples/alternative/ShowAlternativeRoutesActivity.kt
Outdated
Show resolved
Hide resolved
69592e9
to
0863b04
Compare
0863b04
to
de2eac1
Compare
Resolves #128
Some initial ideas
I migrated
ShowAlternativeRoutesActivity
to the non-experimental apis to get a feel for how the migration will go. I think we should define some extensions because there is a lot of boilerplate.If we defined
MapboxNavigationApp
extensions inside the core sdk, that could make it nicer. So I added an idea to theShowCurrentLocationActivity
example. This way yourinit
function looks something like this? Just an idea.