Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent to use the map route until the map is ready and the route fetched #1134

Merged
merged 1 commit into from
Jul 20, 2018

Conversation

Guardiola31337
Copy link
Contributor

  • Prevents to use the mapRoute until the map is ready and the route fetched
  • Hides the launchNavigationFab until a route is fetched to avoid Null directionsRoute NullPointerException 👇
07-20 16:14:17.712 6771-6771/com.mapbox.services.android.navigation.testapp E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.mapbox.services.android.navigation.testapp, PID: 6771
    java.lang.NullPointerException: Null directionsRoute
        at com.mapbox.services.android.navigation.ui.v5.AutoValue_NavigationViewOptions$Builder.directionsRoute(AutoValue_NavigationViewOptions.java:288)
        at com.mapbox.services.android.navigation.testapp.activity.navigationui.DualNavigationMapActivity.launchNavigation(DualNavigationMapActivity.java:271)
        at com.mapbox.services.android.navigation.testapp.activity.navigationui.DualNavigationMapActivity.lambda$onCreate$0$DualNavigationMapActivity(DualNavigationMapActivity.java:85)
        at com.mapbox.services.android.navigation.testapp.activity.navigationui.DualNavigationMapActivity$$Lambda$0.onClick(Unknown Source)
        at android.view.View.performClick(View.java:5198)
        at android.view.View$PerformClick.run(View.java:21147)
        at android.os.Handler.handleCallback(Handler.java:739)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:148)
        at android.app.ActivityThread.main(ActivityThread.java:5417)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Closes #1130

@Guardiola31337 Guardiola31337 added bug Defect to be fixed. test app labels Jul 20, 2018
@Guardiola31337 Guardiola31337 self-assigned this Jul 20, 2018
@Guardiola31337 Guardiola31337 force-pushed the pg-1130-dual-navigation-map-activity-npe branch from e45bec2 to a123552 Compare July 20, 2018 14:49
Copy link
Contributor

@danesfeder danesfeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix on that @Guardiola31337 🚢

…ched and hide the launch navigation fab until a route is fetched to avoid null directions route npe
@Guardiola31337 Guardiola31337 force-pushed the pg-1130-dual-navigation-map-activity-npe branch from a123552 to ab4a47b Compare July 20, 2018 16:28
@Guardiola31337 Guardiola31337 merged commit 3a951eb into master Jul 20, 2018
@Guardiola31337 Guardiola31337 deleted the pg-1130-dual-navigation-map-activity-npe branch July 20, 2018 16:51
@Guardiola31337 Guardiola31337 mentioned this pull request Aug 10, 2018
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defect to be fixed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants