eopeter / flutter_mapbox_navigation

Turn By Turn Navigation for Your Flutter Application
Apache License 2.0
211 stars 177 forks source link

RouteProgressEvent does not exist in Android? #137

Closed luismlg closed 1 year ago

luismlg commented 3 years ago

I am working with the RouteProgressEvent class. On the iOS platform I get it to work correctly, but on android it gives me the following error:

E/flutter (25082): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: type 'String' is not a subtype of type 'RouteProgressEvent' in type cast E/flutter (25082): #0 _ClassTourPage._onEmbeddedRouteEvent E/flutter (25082): #1 MapBoxNavigation._onProgressData E/flutter (25082): #2 _rootRunUnary (dart:async/zone.dart:1362:47) E/flutter (25082): #3 _CustomZone.runUnary (dart:async/zone.dart:1265:19) E/flutter (25082): #4 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7) E/flutter (25082): #5 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11) E/flutter (25082): #6 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7) E/flutter (25082): #7 _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11) E/flutter (25082): #8 _MapStream._handleData (dart:async/stream_pipe.dart:218:10) E/flutter (25082): #9 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13) E/flutter (25082): #10 _rootRunUnary (dart:async/zone.dart:1362:47) E/flutter (25082): #11 _CustomZone.runUnary (dart:async/zone.dart:1265:19) E/flutter (25082): #12 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7) E/flutter (25082): #13 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11) E/flutter (25082): #14 _DelayedData.perform (dart:async/stream_impl.dart:591:14) E/flutter (25082): #15 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11) E/flutter (25082): #16 _PendingEvents.schedule. (dart:async/stream_impl.dart:663:7) E/flutter (25082): #17 _rootRun (dart:async/zone.dart:1346:47) E/flutter (25082): #18 _CustomZone.run (dart:async/zone.dart:1258:19) E/flutter (25082): #19 _CustomZone.runGuarded (dart:async/zone.dart:1162:7) E/flutter (25082): #20 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1202:23) E/flutter (25082): #21 _rootRun (dart:async/zone.dart:1354:13) E/flutter (25082): #22 _CustomZone.run (dart:async/zone.dart:1258:19) E/flutter (25082): #23 _CustomZone.runGuarded (dart:async/zone.dart:1162:7) E/flutter (25082): #24 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1202:23) E/flutter (25082): #25 _microtaskLoop (dart:async/schedule_microtask.dart:40:21) E/flutter (25082): #26 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)

Perhaps this is related, during navigation only the following events appear: MapBoxEvent.banner_instruction and MapBoxEvent.speech_announcement.

And _directions (MapBoxNavigation) .currentLegIndex is ALWAYS 0.

Am I setting something wrong? Thanks.

PD: I use the latest update (flutter_mapbox_navigation: ^0.0.26)

luismlg commented 3 years ago

we know why we don't have MapBoxEvent.progress_change in android? in previous versions this did work, right? @eopeter

luismlg commented 3 years ago

@eopeter do you know something?

eopeter commented 1 year ago

Stale issue message

luismlg commented 1 year ago

Has this been fixed in the new versions? thank you!

eopeter commented 1 year ago

Should be fixed