Extract Android Auto examples / integration from `qa-test-app`
While working on https://github.com/mapbox/mapbox-navigation-android/pull/6168 run into the following runtime crash 💥
2022-08-15 13:36:56.694 32381-32381/com.mapbox.navigation.qa_test_app E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mapbox.navigation.qa_test_app, PID: 32381
java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN6mapbox6common13EventsServiceC1EONS0_20EventsServiceOptionsE" referenced by "/data/app/~~OizNd-3TsHp8ZBynlIYeeA==/com.mapbox.navigation.qa_test_app-ysQhSUDPncLKcbndF2HP_g==/base.apk!/lib/arm64-v8a/libSearchCore.so"...
at android.app.ActivityThread.installProvider(ActivityThread.java:7430)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6942)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6713)
at android.app.ActivityThread.access$1500(ActivityThread.java:247)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2057)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7842)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
when running the qa-test-app. This is due to Search SDK version currently used brings a different Common SDK version. This ticket keeps track of conditionalizing the build somehow if AA is not used or maybe extract AA examples / integration to a separate module with the goal of avoiding this kind of conflicts when bumping SDK dependency versions.
What do you think @mapbox/navigation-android?
cc @kmadsen @abhishek1508 @cafesilencio @LukasPaczos
We're looking to integrate with search long term. The common SDK strict requirement is burdensome not just for upgrades, but version flexibility with different libraries. That said, it either happens down stream or right here in mapbox-navigation-android. The problem will still exist, you just will see it down stream (any customer who has search and is integrating a new sdk will be blocked, instead we're trying to block mapbox-navigation-android from releasing incompatible SDKs).
An effort that is happening, but is a not meant for addressing this issue. Is we plan to make make search an optional dependency. So qa-test-app could simply remove search when there are issues integrating the latest and other developers can be unblocked https://github.com/mapbox/mapbox-navigation-android/issues/5786.
Another effort could be, to help Search SDK create a release schedule that reliably includes common sdk.
Extracting android-auto to a separate app would be a temporary solution while we make progress on the efforts above.
I'm looking for public open Android Auto tickets and found this.
There is a new https://github.com/mapbox/mapbox-navigation-android/tree/main/android-auto-app
Android Auto is not the mechanism to discover "Search has been updated to latest Common SDK version" issue. Reason we needed to create a new example app is because ui-androidauto does not yet have a beta channel yet. We could add androidauto back to qa-test-app with a beta channel - but we are not finding reasons to do so yet.