Results 1 to 4 of 4

Thread: SKMaps was not initialized after initialize

  1. #1
    Neuer skobbler
    Join Date
    02.09.2015
    Posts
    5

    SKMaps was not initialized after initialize

    Hi,

    I have one sporadical issue with Skobbler maps. It reproduces infrequently but it happens.
    In code I have loader fragment that check SKMaps.getInstance().isSKMapsInitialized() and if not - run initialisation and load map after that.
    So Skobbler maps is always initialised when fragment loaded. But sometimes I still get exception com.skobbler.ngx.SKMapsInitializationException: SKMaps was not initialised.
    I've tried to add two second delay on case if SKMaps use asynchronous operations, but this does not help.

    Full exception trace: http://pastebin.com/zwejJbhW

  2. #2
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    Have you initialized SKMaps by calling: SKMaps.getInstance().initializeSKMaps(context, mapInitSettings, developerKey)?

    If you check the AndroidOpenSourceDemo for Public SDK 2.5, you can see that the path to the mapResources (needed for SDK initialization ) is stored in preferences. So , please do that in your application and call the initialization of the SDK before inflating the SKMapViewHolder:
    See the demo MapActivity.java - onCreateMethod :

    DemoUtils.initializeLibrary(this);
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_map);

    Let us know if this solves the issue.
    Last edited by Adela_Silvia; 25.09.2015 at 12:31.

  3. #3
    Neuer skobbler
    Join Date
    02.09.2015
    Posts
    5
    We are using map in fragment, inside another activity, called from main activity.

    As we see after map activity is closed map becomes uninitialized.

    Sometimes it happens when activity is paused.

    So we have to check this every time for map initialized property.

    But even in this case sometimes we get that error.

  4. #4
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    We'll investigate this and we'll get back when we have updates.

    Update[05.11.2015]:
    Our developers didn't managed to reproduce your issue.

    Related to our previous discussion:
    -You've said that map becomes uninitialized- are you calling SKMaps.getInstance().destroySKMaps(); inside the onDestroy() method from MapActivity.java?

    -You said also that "sometimes it happens when activity is paused"-the activity/ fragment that uses the SKMapViewHolder has to override it’s methods onPause and onResume and call the corresponding methods of SKMapViewHolder.

    In order to replicate your issue please send us a demo project (adding it here or sending it at dev@telenav.com)
    Last edited by Adela_Silvia; 05.11.2015 at 17:32.

Posting Permissions

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