MapSettings.setIsolatedDiskCacheRootPath() 不清楚

MapSettings.setIsolatedDiskCacheRootPath() is unclear

我正在此处评估 Android SDK Premium v​​3.13。2_86。

turn-by-turn-navigation sample there is a call MapSettings.setIsolatedDiskCacheRootPath(). However the API doc 中表示该方法已弃用:

Deprecated. As of SDK 3.13. This method will be replaced with new one once shared map service feature is removed. Method to allow switching of the disk cache to a separate service process and disk cache path.

所以我不确定是否应该使用这种方法。如果我不调用它会怎样?

当然,我希望在我的应用程序中有一个地图数据缓存。理想情况下,它应该对我的应用程序是私有的,因此其他应用程序(即使是那些使用 HERE SDK 的应用程序)也无权访问缓存。我怎样才能做到这一点?

从文档和您引用的内容来看,SDK 3.13 仍然支持共享地图服务,因此您必须继续使用 MapSettings.setIsolatedDiskCacheRootPath() 方法,直到在以后的版本中共享地图服务功能被删除和新的方法介绍。

对于 SDK 3.16,建议改用 setDiskCacheRootPath

val diskCacheRoot = (Environment.getExternalStorageDirectory().path
                + File.separator + ".isolated-here-maps")
MapSettings.setDiskCacheRootPath(diskCacheRoot)