prepareSurfaceCallback

fun prepareSurfaceCallback(carContext: CarContext, mapInitOptions: MapInitOptions): SurfaceCallback

Instead of using setup, this function allows you to create your own SurfaceCallback and forward the calls to the returned SurfaceCallback. This makes it possible for you to adopt new api versions or intercept the calls and continue to use the MapboxCarMap as designed.

This may be a temporary solution, while androidx.car.app:app:1.3.0 is rolling out SurfaceCallback.onClick. If there is no use for this function in the future, it will be removed.