Vinicius Dias Costa New Member Licensed User Jul 6, 2017 #1 How to get a value saved with keyvaluestore when the application starts? I am learning how to use b4a and can not start a database variable. Last edited: Jul 6, 2017
How to get a value saved with keyvaluestore when the application starts? I am learning how to use b4a and can not start a database variable.
imbault Well-Known Member Licensed User Longtime User Jul 6, 2017 #2 what exactly are you trying to do? Upvote 0
Star-Dust Expert Licensed User Longtime User Jul 6, 2017 #3 You can save variables in a Map file Read value on Activity_Create or better Starter Sevice B4X: Dim Mymap As Map Mymap=File.ReadMap(File.DirInternal,"key.map") My1=Mymap.Get("MyKey1") My2=Mymap.Get("MyKey1") Write On Activiy_Pause B4X: Mymap.Initialize Mymap.Put("MyKey1",My1) Mymap.Put("MyKey2",My2) File.WriteMap(File.DirInternal,"key.map",Mymap) Upvote 0
You can save variables in a Map file Read value on Activity_Create or better Starter Sevice B4X: Dim Mymap As Map Mymap=File.ReadMap(File.DirInternal,"key.map") My1=Mymap.Get("MyKey1") My2=Mymap.Get("MyKey1") Write On Activiy_Pause B4X: Mymap.Initialize Mymap.Put("MyKey1",My1) Mymap.Put("MyKey2",My2) File.WriteMap(File.DirInternal,"key.map",Mymap)
DonManfred Expert Licensed User Longtime User Jul 6, 2017 #4 Vinicius Dias Costa said: How to get a value saved with keyvaluestore when the application starts? Click to expand... You did looked at the tutorial? Upvote 0
Vinicius Dias Costa said: How to get a value saved with keyvaluestore when the application starts? Click to expand... You did looked at the tutorial?