red30 Well-Known Member Licensed User Longtime User Sep 27, 2016 #1 Public const=0 As Int There is a public const that changes its value in the programme. How can I save this value in memory when closing the programme in order I could use it when open the programme the next time?
Public const=0 As Int There is a public const that changes its value in the programme. How can I save this value in memory when closing the programme in order I could use it when open the programme the next time?
DonManfred Expert Licensed User Longtime User Sep 27, 2016 #2 https://www.b4x.com/android/forum/t...ple-and-efficient-key-value-data-store.26317/ Upvote 0
red30 Well-Known Member Licensed User Longtime User Sep 28, 2016 #3 Is there an easier way? I need to write only one integer type value. And every time you start the program to watch it. Upvote 0
Is there an easier way? I need to write only one integer type value. And every time you start the program to watch it.
red30 Well-Known Member Licensed User Longtime User Sep 28, 2016 #4 I have a variable: Public const=0 As Int In the program, I changed it to: const=1 How do I save it and the next time you start reading? It can be an example please! Upvote 0
I have a variable: Public const=0 As Int In the program, I changed it to: const=1 How do I save it and the next time you start reading? It can be an example please!
I inakigarm Well-Known Member Licensed User Longtime User Sep 28, 2016 #5 Most simplest example: (from B4A IDE info) Write it: Code: File.WriteString(File.DirRootExternal, "1.txt", "Some text") Read it: Code: Dim text As String text = File.ReadString(File.DirRootExternal, "1.txt") See File object for more options Upvote 0
Most simplest example: (from B4A IDE info) Write it: Code: File.WriteString(File.DirRootExternal, "1.txt", "Some text") Read it: Code: Dim text As String text = File.ReadString(File.DirRootExternal, "1.txt") See File object for more options
red30 Well-Known Member Licensed User Longtime User Sep 28, 2016 #6 A type integer? Where is it being stored? Upvote 0
I inakigarm Well-Known Member Licensed User Longtime User Sep 28, 2016 #7 You save an Integer as String and parse to Int when read from file; it can be stored on internal memory or external (SD) memory; please check the Beginner's guide at https://www.b4x.com/android/files/guide.zip (File Object: Page 321) Upvote 0
You save an Integer as String and parse to Int when read from file; it can be stored on internal memory or external (SD) memory; please check the Beginner's guide at https://www.b4x.com/android/files/guide.zip (File Object: Page 321)