I’m trying to build a simple app to get to grips with android as I’m new. I have programmed for years in PHP and MySQL so it’s not completely unfamiliar to me, but one concept is at the moment confusing to me.
If I wanted to create this app with 100’s of questions how would I create the database like this. What I mean is at the moment my app runs and creates the database. Would I need to do this everytime the app runs as i’m guessing if it was a lot bigger it would mean a slow load evert time.
Or is there a way to create the database once and then when the app runs there is no need to populate it.
Max
Steps
i>Install the Android mobile application & run
ii> Create the database & the table when the mobile application is executed for the first time
sample code:
Explanation:
When the mobile application is opened for the first time , the database is created & opened.
Similarly the tables needs to be created as follows.
From next time onwards when the mobile application is executed , only the database needs to be opened since its already created . The same applies for the tables too.
You can dump the 100 questions at the first time if you want , showing a progressdialog with proper message to indicate to the user that a background activity is being performed