I'm connected through WiFi to a real device with no external SD card. The following code is not creating a file in internal storage that I can find. The Log does show the values that should be going to storage. I am assuming the file should be there after the program is terminated and I turn on usb storage.
B4X:
Sub Process_Globals
Dim CountWrong(15) As Int
Dim kvs As KeyValueStore
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Activity.LoadLayout("splash")
If FirstTime Then
kvs.Initialize(File.DirInternal, DateTime.Now&"Counts")
End If
For i = 1 To 14
CountWrong(i) = 0
Next
CountWrong(1) = 100
CountWrong(2) = 200
CountWrong(3) = 300
CountWrong(4) = 400
CountWrong(5) = 500
CountWrong(6) = 600
CountWrong(7) = 700
CountWrong(8) = 800
CountWrong(9) = 900
For i = 1 To 14
' 'put a "simple" value
kvs.PutSimple(i, CountWrong(i))
'fetch this value
Log(i&" "&CountWrong(i))
Next
End Sub