Results 1 to 3 of 3

Thread: Understanding CONNECTIVITY_MODE_OFFLINE time to set

  1. #1
    Neuer skobbler
    Join Date
    04.06.2015
    Posts
    6

    Understanding CONNECTIVITY_MODE_OFFLINE time to set

    Hello,

    I'm trying to implement only offline mode for my Android App. That means I would like to download any package and show it on the map. And one necessary thing is to set CONNECTIVITY_MODE_OFFLINE like this:
    Code:
    SKMaps.getInstance().setConnectivityMode(SKMaps.CONNECTIVITY_MODE_OFFLINE);
    But I have this question - When should I do that? If I do it right after initialization
    Code:
    SKMaps.getInstance().initializeSKMaps(context, initMapSettings);
    then my downloaded (in the future) maps didn't show up. And no cities and country labels on the map. I suppose SKMaps doesn't have time to download this information. If I set CONNECTIVITY_MODE_OFFLINE sometime in future - than it's OK, I can see only downloaded maps. But it is just my guess, when to set this mode.

    So when exactly should I set CONNECTIVITY_MODE_OFFLINE so important data has time to be downloaded?


    Maxim.

  2. #2
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    Hi Maxim,

    You should set the offline mode after getting the MetaData callback.

    You have to be sure that metadata is downloaded before adding the package.
    SKMetaDataListener provides a callback (public void onMetaDataDownloadFinished(int versionNumber) ) -tells you when these meta files are ready. Only after receiving this callback the map can be successfully rendered.

    Let us know if you need further help.

  3. #3
    Neuer skobbler
    Join Date
    04.06.2015
    Posts
    6
    Hi Adela,

    Thank you so much for such detailed answer!

Posting Permissions

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