mapbox-navigation-android icon indicating copy to clipboard operation
mapbox-navigation-android copied to clipboard

[Android Auto] Make the search sdk an optional dependency

Open kmadsen opened this issue 3 years ago • 0 comments

For the first developer release of androidauto-v0.1.0 we are including the search SDK. But a request has already been made to have search be optional within the SDK. This ticket is arguable, if it gains support we will do it but there are some risks to going with this approach. Runtime checks using reflection are always risky solutions.

This can be done by changing the search sdk dependency to compileOnly

- api(dependenciesList.mapboxSearchSdk)
+ compileOnly(dependenciesList.mapboxSearchSdk)

But this also requires runtime checks to ensure the classes exist. Before opening search or favorite options, the android auto sdk will need to check if the class exists.

kmadsen avatar May 06 '22 16:05 kmadsen