Open cuifei opened 1 year ago
@cuifei It looks like you're using the NavigationView Drop in so you can reference that to set replay to false (Docs):
layout xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.myapplication.NavigationViewActivity"
xmlns:app="http://schemas.android.com/apk/res-auto"
>
<com.mapbox.navigation.dropin.NavigationView
android:id="@+id/navView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:accessToken="@string/mapbox_access_token"
/>
</RelativeLayout>
Activity
class NavigationViewActivity : AppCompatActivity() {
private lateinit var navigationView: NavigationView
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
navigationView = findViewById(R.id.navView)
navigationView.api.routeReplayEnabled(false)
}
}
Android API: Android 13 Mapbox Navigation SDK version: 2.10.4 implementation "com.mapbox.navigation:android:2.10.4" implementation "com.mapbox.navigation:ui-dropin:2.10.4"
Steps to trigger behavior
Activity path com.mapbox.navigation.examples.standalone.turnbyturn.TurnByTurnExperienceActivity
MapboxNavigationApp.setup( NavigationOptions.Builder(this) .accessToken(getString(R.string.mapbox_access_token)) // comment out the location engine setting block to disable simulation //.locationEngine(replayLocationEngine) .build() )
Install Mapbox Navigation example App
Expected behavior
disable simulation
Actual behavior
test machine huawei、meizu Navigation along the route is being simulated regardless of the setting , but is okay in test machine xiaomi