Clear Storage
The Recent Searches and Bookings shown on the Landing Page are stored are stored locally on device. This locally stored data can be cleared prior to starting a CarTrawler flow.
Initialise our CTRecentSearchRepository class as follows:
val context = this.applicationContext
val executor = Executors.newSingleThreadExecutor()
val repository = CTRecentSearchRepository(context, executor)
Call the clearStorage function as follows:
repository.clearStorage()
It’s not possible to clear the storage while the SDK is being presented on screen.