Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Directions API. Url provider

Open
#1,129 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, java
Domain
api, build-system

Research direction

Start by comparing Router.kt, MapboxDirections.java, and the internal RouteUrl.kt implementation, then inspect the module dependency graphs shown in the issue. Determine how the shared route-URL behavior can be independently consumed without bringing network dependencies into Offline Router; done means both router types can use the shared provider while service-core interfaces remain unchanged.

Written by the indexing model from the issue text.

Description

Directions Feature
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

Dominant language
Java
Stars
438
Forks
117
PR merge metrics
No merged PRs in 30d

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.

More from mapbox/mapbox-java

All issues in mapbox/mapbox-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.