dataPath property
Path used for storing application internal data, such as the offline search index and other essential data required for proper functionality.
Note: For common use cases, prefer SDKOptions.persistentMapStoragePath, or keep the default paths. Use dataPath only as a fallback if SDKOptions.persistentMapStoragePath is not writable, for example, when you have an agreement with HERE to flash data at factory time.
By default, this returns an empty string. In this case, the same path as SDKOptions.persistentMapStoragePath will be used.
If an absolute path is set, it will be used instead.
If a relative path is set then directory
Application Library directory for iOS and Context.getFilesDir().getPath() for Android is used as parent path.
Application must have read/write permissions to the given desired path.
It is recommended that the application has exclusive access to this path.
Avoid using shared or public directories such as Download or Documents.
Using such directories may cause certain HERE SDK features to behave with limitations.
For example, index creation for offline search may fail or not function as expected.
It is recommended not to use the application cache paths like
<Application_Home>/Library/Caches for iOS and Context.getCacheDir().getPath() for Android, since operating system manages data in this location
and data can be deleted if the device is low on storage space, which will result in application malfunction.
The path can be on internal or external storage. The internal storage is recommended due to the file I/O speed.
Note:
If the SDKOptions.persistentMapStoragePath is writable, dataPath can be left empty.
If the SDKOptions.persistentMapStoragePath is not writable, dataPath must be set and also be writable. Note that dataPath is used to store essential HERE SDK data.
Important:
There is no automatic migration of stored data between the SDKOptions.persistentMapStoragePath and the dataPath. For ease of management,
it's recommended to set the persistence path as writable and ignore dataPath.
If dataPath is set differently from the SDKOptions.persistentMapStoragePath, some data that would typically be saved in the SDKOptions.persistentMapStoragePath will now be saved to dataPath.
If dataPath is set and later unset, any data stored there will remain inaccessible and will not be migrated back.
Implementation
String dataPath;