I am using the ExternalStorage class to manipulate ~3000 data files on a SD card. When the app starts, it will read the data directory and map the files by name as ExternalFile types. I then use the map to access the files while the app is running.
The problem is, the initial scan to load the map takes 2-3 minutes. I would like to save the map so it doesn't have to be regenerated every time.
I tried File.WriteMap but it converts the object to text and it doesn't come back properly with File.ReadMap
I also tried using the KeyValueStore class to store the ExternalFile type. I also tried just tried just storing the Native JavaObject. Both of these had errors when reading back the value (error converting Object to JavaObject).
Any recommendations on storing a map/list/etc. of ExternalFile types?
B4X:
Type ExternalFile (Name As String, Length As Long, LastModified As Long, IsFolder As Boolean, Native As JavaObject)
I tried File.WriteMap but it converts the object to text and it doesn't come back properly with File.ReadMap
I also tried using the KeyValueStore class to store the ExternalFile type. I also tried just tried just storing the Native JavaObject. Both of these had errors when reading back the value (error converting Object to JavaObject).
Any recommendations on storing a map/list/etc. of ExternalFile types?