mapbox / mapbox/mapbox-navigation-android-examples

Migrate examples from `MapboxNavigationProvider` to `MapboxNavigationApp`

Open
#128 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

jira-sync-complete
Dominant language
Kotlin
Stars
65
Forks
56
Avg merge
1d 4h
Merged PRs (30d)
2

Description

It will be some time before we upgrade the examples repository to `com.mapbox.navigation:android:2.8.0-alpha.2`.

Opening so we can start considering the migration, but we're still building tools that make migration easier
For example the [extensions](https://github.com/mapbox/mapbox-navigation-android/blob/main/libnavigation-core/src/main/java/com/mapbox/navigation/core/internal/extensions/MapboxLifecycleExtensions.kt) are still experimental.

- [ ] ShowAlternativeRoutesActivity
- [ ] ShowManeuversActivity
- [ ] MultipleWayPointsActivity
- [ ] ShowTripProgressActivity
- [ ] ShowCameraTransitionsActivity
- [ ] ShowCurrentLocationActivity
- [ ] ShowJunctionsActivity
- [ ] FetchARouteActivity
- [ ] RenderRouteLineActivity
- [ ] TurnByTurnExperienceActivity
- [ ] MapboxSignboardActivity
- [ ] PlayVoiceInstructionsActivity
- [ ] ShowSpeedLimitActivity
- [ ] ReplayHistoryActivity
- [ ] CustomArrivalActivity
- [ ] ShowBuildingExtrusionsActivity

## Migration plan

We want to commit to a migration plan for the examples repository by **September 5th** because that is the week the `2.8.0` release becomes a release candidate and we will be committed to apis for a stable release.

Note that, not-migrating and using `MapboxNavigation` directly is also an option. `MapboxNavigationApp` is built for large apps.

## Resources

The architecture is designed for you to build de-coupled classes like the [LocationComponent](https://github.com/mapbox/mapbox-navigation-android/blob/d8d04fe75e53063f5e185c3779c04c7b0914f77d/libnavui-dropin/src/main/java/com/mapbox/navigation/dropin/component/location/LocationComponent.kt#L15-L39), or a more complicated example is the [CameraComponent](https://github.com/mapbox/mapbox-navigation-android/blob/d8d04fe75e53063f5e185c3779c04c7b0914f77d/libnavui-dropin/src/main/java/com/mapbox/navigation/dropin/component/camera/CameraComponent.kt#L32-L242). There are other approaches that are worth considering.

Some public documentation on the `MapboxNavigationApp` can be found here https://docs.mapbox.com/android/navigation/guides/androidauto/car-app-lifecycle/

We will also explore migration ideas in the [qa-test-app](https://github.com/mapbox/mapbox-navigation-android/tree/main/qa-test-app)

## Ideas are welcome

I'm obviously not the only one using this new library, so feel free to bring in some opinions and ideas. Feel free to open a pull request against this [migrate-MapboxNavigationApp](https://github.com/mapbox/mapbox-navigation-android-examples/pull/129) branch. Or create new pull requests.

cc: @mapbox/navigation-android

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the migration plan and the listed example activities, then review the MapboxNavigationApp documentation and the qa-test-app for migration patterns. The migrate-MapboxNavigationApp branch and the linked architecture resources provide additional context. Done means either migrating the listed examples consistently or documenting a decision to continue using MapboxNavigation directly.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.