eopeter / flutter_mapbox_navigation

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

force close #338

Closed behjat-amir closed 7 months ago

behjat-amir commented 10 months ago

hi when i click cancel button , navigation app is close , i need when click cancel button , go to another page

samargy commented 10 months ago

same issue

marcoberetta96 commented 10 months ago

same issue

eopeter commented 8 months ago

Stale issue message

YoavSl commented 5 months ago

Same issue, have you managed to fix it?

behjat-amir commented 5 months ago

No i cant

On Sun, Jun 23, 2024, 13:00 Yoav Slama @.***> wrote:

Same issue, have you managed to fix it?

— Reply to this email directly, view it on GitHub https://github.com/eopeter/flutter_mapbox_navigation/issues/338#issuecomment-2184917776, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK6FLNWN6YBARF6BR6O36B3ZI2ITNAVCNFSM6AAAAABJYGTUZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBUHEYTONZXGY . You are receiving this because you authored the thread.Message ID: @.***>

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
                }
            }
        }