Shared Map Resources
HERE SDK utilizes a shared disk cache on external device memory where it keeps map resources. This disk cache is shared between all applications and components that use HERE SDK. The disk cache can be accessed by multiple applications concurrently even while map data is being loaded. (For more information see Preloading Map Data)
Usage of map resources must be properly handled on an application level. When an application is in active use, it must hold a reference to map resources for HERE SDK functionality to work. When an application is not being used (for example, it has been sent to the background), it should release its reference to map resources.
SupportMapFragment users map resource usage is handled automatically, so explicit handling of map resource references is not required.
Reference handling can be performed manually. This is useful if an application is supposed to support a use case outside the scope of classes that provide automatic reference handling. Some examples of this include performing route calculations in a background service or directly using a
onPause()- decrements the reference count of map resource usage
onResume()- increments the reference count of map resource usage
getResourceReferenceCount()- get the current reference count of map resource usage for your application
For more info on these methods and their usage consult the API reference.