create
Creates an instance of PersonalData that stores data in the specified directory and optionally synchronizes personal data online across devices.
Database recovery:
If the underlying database becomes corrupted, the factory provides a recovery mechanism. When corruption is detected during a database operation, the current database source is closed and a new one is automatically recreated. Consequently, any data stored in the corrupted database will be lost. However, for online configurations, the data will be automatically synchronized with the backend to recreate the user profile.
Return
An instance of PersonalData.
Note: There can be only one instance of PersonalData per storage directory. If you create multiple instances of PersonalData with the same storage directory, the factory will return the same instance. If an offline instance already exists (without online configuration) for the specified storage directory and you try to create an online instance (with online configuration), and vice versa, the factory will throw an IllegalArgumentException.
Parameters
The Context holding information about an application environment.
The directory where the personal data will be stored.
The optional configuration needed to synchronize personal data online across devices. The data is synchronized with the TomTom cloud, allowing it to be accessed across multiple devices. If the configuration is not provided, the personal data will be stored offline (only on the current device).