Results 1 to 2 of 2

Thread: saveRouteToCache returns false instead of true when save succeeds (Android)

  1. #1
    Neuer skobbler
    Join Date
    17.09.2015
    Posts
    2

    Ausrufezeichen saveRouteToCache returns false instead of true when save succeeds (Android)

    saveRouteToCache returns false instead of true when save succeeds (Android)

    Version 2.5 JavaDoc says:
    Code:
    public boolean saveRouteToCache(int routeID)
    routeID - The id of the route, which can be obtained from SKRouteListener.onRouteCalculationCompleted(SKRouteInfo) 
    Returns: true for success false otherwise.
    
    public void loadRouteFromCache(int routeID)
    routeID - id of the route.
    I calculated a route with 2 alternates and saved them to the cache.

    Code:
    for (int routeId : newRoutes) {
        SKRouteManager.getInstance().saveRouteToCache(routeId);
    }
    saveRouteToCache Route with ID  2806427 saved to cache  = false
    saveRouteToCache Route with ID  7000731 saved to cache  = false
    According to the status, it failed, but this works:
    Code:
    SKRouteManager.getInstance().loadRouteFromCache(mRoutes.get(index).id);
    loadRouteFromCache with ID = 2806427 from cache 
    loadRouteFromCache with ID = 7000731 from cache
    What really confused me is that I originally tried the save using the wrong ID and got a success status, even though the routes weren't actually saved:
    Code:
       for (int i = 0 ; i < newRoutes.size() ; i++) {
           SKRouteManager.getInstance().saveRouteToCache(i);
       }
       saveRouteToCache Route with ID  0 saved to cache  = true
       saveRouteToCache Route with ID  1 saved to cache  = true

  2. #2
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    Thank you ehartwell for reporting this.
    We'll investigate it as soon as possible.

    Update[28.10.2015]: we confirm that is was an issue on our side. The fix will be available in the next SDK update
    Last edited by Adela_Silvia; 28.10.2015 at 16:20.

Tags for this Thread

Posting Permissions

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