Skip to content

Commit

Permalink
move to onStart
Browse files Browse the repository at this point in the history
  • Loading branch information
kmadsen committed Aug 30, 2022
1 parent 4aa79cd commit de2eac1
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ class MainActivity : AppCompatActivity(), PermissionsListener {
return
}

// Each example needs to call MapboxNavigationApp.setup.
MapboxNavigationApp.disable()

binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)

Expand All @@ -44,6 +41,12 @@ class MainActivity : AppCompatActivity(), PermissionsListener {
bindExamples()
}

override fun onStart() {
super.onStart()
// Each example is responsible for setting up their NavigationOptions.
MapboxNavigationApp.disable()
}

override fun onExplanationNeeded(permissionsToExplain: MutableList<String>?) {
Toast.makeText(
this,
Expand Down

0 comments on commit de2eac1

Please sign in to comment.