Should I use a database?

SemiKolon

Member
Licensed User
Longtime User
Hi,

I'm very new to basic4android. I want to make an easy app that just shows a list and when i click an item, it shows me a text (ScrollView). After completing the design I would like to make a database, but I first have a few questions.

Will the database be stored in the apk? I don't want the user to add something to the database. I just want to read the texts from the database. Can you suggest me a good tutorial? The tutorials I found just talked about storing in a DB.
 

SemiKolon

Member
Licensed User
Longtime User
I figured it out :)

However, I noticed a different problem. In my database I have a system column which gets the value 0 or 1.
I want to save the entry in a different listview depending on the value of system. I just don't figure out why it is not working :(

My code for this:
B4X:
For i = 0 To countries.Size - 1
      Dim m As Map
      m = countries.Get(i)
      system = m.Get("system")
      If system = "null" Then
          title = m.Get("title")
     text = m.Get("text")
          ListView2.AddSingleLine(title)
   Else 
     title2 = m.Get("title")
     text2 = m.Get("text")
          ListView1.AddSingleLine(title2)
        End If

edit: figured that one out too :)
 
Last edited:
Upvote 0
Top