Skip to content

Directions API. Url provider  #1129

Open
@RingerJK

Description

@RingerJK

Description

In terms of Navigation for Android exists 2 types of Navigation(Router), it's Offline and Online. Both of them needs Route-URL provider.(Offline and Online are different modules , have own dependency graph and might be used independent).

Online Router's Route URL is provided by MapboxDirections that is a part of services-core library(under the hood is Retrofit(+OkHttp) library)

Problem

Offline Router cannot consume url from services-core because it brings "network" dependencies like Retrofit and OkHttp(they shouldn't be in Offline navigation).
Offline Router has own route-url provider RouteUrl
The main issue here: two classes where the same piece of logic exist.

Solution

  • keep service-core library interfaces as it is
  • create additional library (like router-url-provider) that depends on service-directions-model and (if java doesn't have clever approach for creating url) additional java library

How dependency tree looks now
Screen Shot 2020-03-12 at 16 38 40

Suggestion
Screen Shot 2020-03-12 at 16 47 59

Pros

router-url-provider might be used independently on service-core 👍

cc @mapbox/navigation-android @mapbox/maps-android @mapbox/navigation-api

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions