Quote:
Originally Posted by jonbonazza
Hello,
1) There is no way to do anything when the app is installed. The best you can do is check the data on the sd card, and handle it appropriately. For this, you will obviously need some kind of persistent data store, such as SharedPreferences, but the exact implementation depends entirely on your app's needs.
|
I can live with that, I'll have a look into SharedPreferences
Quote:
Originally Posted by jonbonazza
2) In this case, I would used a LinkedList object instead of an array. It's easier to implement as you don't need to know the size of the list ahead of time. The way you load it would depend on the file structure and whether it was binary or plain-text. More info is needed to give a better answer.
|
The file structure is up to me, it's likely to be either csv or XML. Basically I'm loading information on sports players (Squad Number, Surname). Each team will have their own text file containing all their players.
Quote:
Originally Posted by jonbonazza
3) What do you wish to do with the data once accessed?
|
The plan is to load the list of players from the text file (see point 2) and then have a screen allowing you to select which player has just scored. From that, it's going to put start building up a string to send vie Twitter or SMS to send score updates.
So the overall plan is:
1. pick which teams are playing
2. load the two text files into LinkedList variables
3. each time a goal is scored:
3a select the team which has scored
3b select the player who scored and a load of other details
I'm aware that at step 3b I could load straight from the text file each time, but I thought it'd be quicker to load it once and keep it in memory.
Thanks for your help, it's much appreciated!