android / android/car-samples

NavigationTemplate doesn't show the map. Black screen

Open
#26 3 comments 4 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
464
Forks
191
PR merge metrics
No merged PRs in 30d

Description

Hi,
I am playing with the automotive library and I managed to run all the examples and created a project with the templates.

I noticed that using the PlaceListMapTemplate displays the map but when i try using the NavigationTemplate the screen is black (other actions and buttons appear) but only the map is not showing.

I tried to do this simple example on Polestar2:

class NavigationMap(carContext: CarContext) : Screen(carContext) {
override fun onGetTemplate(): Template {
val actionStrip = ActionStrip.Builder()
.addAction(
Action.Builder()
.setTitle("BACK")
.setOnClickListener { this.finish() }
.build())
.build()
return NavigationTemplate.Builder()
.setActionStrip(actionStrip)
.setBackgroundColor(CarColor.SECONDARY)
.build()
}
}

Is is something that I am not doing right or missing a KEY for the map or donno? The examples are using a PNG drawn map and is not that obvious what is wrong.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the NavigationMap screen on a Polestar2, then compare NavigationTemplate with PlaceListMapTemplate, which displays the map. Start by checking the NavigationTemplate setup and the Android automotive examples that use a PNG map. Done means the NavigationTemplate displays its map while retaining the action strip and buttons.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.