Next maneuver
Navigation SDK UX Framework provides information about what action a driver needs to take to get from the current step to the next along a route in a maneuver instruction.
The host application can observe the next Maneuver
changes through the Dash.controller
instance.
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
lifecycleScope.launch {
repeatOnLifecycle(Lifecycle.State.STARTED) {
Dash.controller.observeNextManeuver()
.collect { /* Maneuver */ nextManeuver ->
// Do something with the Maneuver
}
}
}
}
}
この{Type}は役に立ちましたか?