eopeter / flutter_mapbox_navigation

Turn By Turn Navigation for Your Flutter Application
Apache License 2.0
217 stars 185 forks source link

App closes when clicking on stop navigation button (Using embedded navigation) #366

Open YoavSl opened 5 months ago

YoavSl commented 5 months ago

When using embedded navigation and clicking on the close navigation button on the bottom bar ('X'), the app closes. This seems like a known issue (#338), please fix it as this is a critical bug 🙏🏼

Thanks a lot.

nbitton-os commented 4 months ago

Any update on this issue? We are experiencing the same issue

Arshad-ullah commented 4 months ago

Same issue

ffkarine commented 4 months ago

Same issue

ivan-acosta08 commented 2 months ago

still getting this problem, any updates?

subastasrd21 commented 2 months ago

Just search for CustomInfoPanelEndNavButtonBinder.kt

and delete activity.finish(), for example I did a new event called NAVIGATION_USER_CANCELLED and handle the actions with this event.


        return object : UIComponent() {
            override fun onAttached(mapboxNavigation: MapboxNavigation) {
                super.onAttached(mapboxNavigation)
                button.setOnClickListener {
                    //mapboxNavigation.stopTripSession()
                    PluginUtilities.sendEvent(MapBoxEvents.NAVIGATION_USER_CANCELLED)
                    //activity.finish() //--> this
                }
            }
        }