Hi, I'm having problems with getting my head around saving a map in one sub routine and the reading it back into another subroutine
and reading it back in with
What's puzzling me is sometimes it works but very rarely, I don't have an SDCard in the phone as the internal memory is 256Gb, I've tried all the other Dir options but getting nowhere, is it possible to not read and write to storage and just have the data in a Map accessible to all subroutines in the module, the map only has 48 entries and contains new data every time an option is chosen
B4X:
RatesChk.Initialize
For i = 0 To Count - 1
Dim str As Map = results.Get(i)
Dim strVar As String = str.Get("valid_from")
'FromChk= strVar.SubString2(0,10)
invChk = str.Get("value_inc_vat")
If invChk = "" Then invChk="0.00"
tim0Chk = str.Get("valid_from")
tim0Chk = tim0Chk.SubString2(11,16)
RatesChk.Put(tim0Chk, invChk)
Next
File.WriteMap(File.DirInternal, "Rates.txt", RatesChk)
and reading it back in with
B4X:
RatesChk= File.ReadMap(File.DirInternal, "Rates.txt")
What's puzzling me is sometimes it works but very rarely, I don't have an SDCard in the phone as the internal memory is 256Gb, I've tried all the other Dir options but getting nowhere, is it possible to not read and write to storage and just have the data in a Map accessible to all subroutines in the module, the map only has 48 entries and contains new data every time an option is chosen