Shared Map Resources
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.
AndroidXMapFragment 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.