diff --git a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationPlugin.kt b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationPlugin.kt index 253d73b..5ca1709 100644 --- a/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationPlugin.kt +++ b/android/src/main/kotlin/com/google/maps/flutter/navigation/GoogleMapsNavigationPlugin.kt @@ -74,7 +74,7 @@ class GoogleMapsNavigationPlugin : FlutterPlugin, ActivityAware { } override fun onDetachedFromActivity() { - lifecycle.addObserver(GoogleMapsNavigationSessionManager.getInstance()) + lifecycle.removeObserver(GoogleMapsNavigationSessionManager.getInstance()) GoogleMapsNavigationSessionManager.getInstance().onActivityDestroyed() lifecycle.removeObserver(viewRegistry) }