Results 1 to 4 of 4

Thread: [Android] Can't handle the SKRouteListener v2.5

  1. #1
    Neuer skobbler
    Join Date
    22.09.2015
    Posts
    3

    [Android] Can't handle the SKRouteListener v2.5

    Hi all,

    I want to launch a route calculation in a Fragment but my onAllRoutesCompleted implemented in the Fragment is not called
    (yet, the route is well calculated because it is displayed and in the logcat I see the message W/SKMaps﹕ SKRouteManager---- @onAllRoutesCompleted called).

    However, in another Activity called before my Fragment, which is an other step of my app, the SKRouteListener implemented in the Activity works very well.

    I also tried this but it don't work.
    Code:
         
                    route.setRouteMode(routeMode);
                    route.setRouteExposed(true);
                    route.setRequestAdvices(true);
                    route.setExtendedPointsReturned(false);
    
                    SKRouteManager.getInstance().clearCurrentRoute();
    
                    SKRouteManager.getInstance().setRouteListener(new SKRouteListener() {
                        @Override
                        public void onRouteCalculationCompleted(SKRouteInfo skRouteInfo) {
                            routeCalculationCompleted = skRouteInfo.getRouteID();
                        }
    
                        @Override
                        public void onRouteCalculationFailed(SKRoutingErrorCode skRoutingErrorCode) {
                            Log.e("RouteListener", skRoutingErrorCode.toString());
                        }
    
                        @Override
                        public void onAllRoutesCompleted() {
                            if(routeCalculationCompleted == -1) {
                                routeCalculationCompleted = 0;
                            }
                        }
    
                        @Override
                        public void onServerLikeRouteCalculationCompleted(SKRouteJsonAnswer skRouteJsonAnswer) {
    
                        }
    
                        @Override
                        public void onOnlineRouteComputationHanging(int i) {
    
                        }
                    });
    
                    SKRouteManager.getInstance().calculateRoute(route);
    I hope you can help me.
    Thanks a lot.
    Cyril

  2. #2
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    We've asked the help of our developers. We'll get back with a solution as soon as possible

  3. #3
    Neuer skobbler
    Join Date
    22.09.2015
    Posts
    3
    Hello,
    Thanks, did you found something ?

  4. #4
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    We didn't get any update from devs- let me check and I'll get back to you asap

    Update [03.11.2015]: Please find here a demo project : https://www.dropbox.com/s/59p7o011mq...asics.zip?dl=0 built by our developers, which provides an example of launching a route calculation in a fragment.
    Last edited by Adela_Silvia; 05.11.2015 at 17:03.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •