I\'m doing a sample Quiz application in Android. I used array to store the Questions and Answers, now I wish to store the questions and answers in a .csv
file.
Put you .csv in the assert folder and access it as follow
I was using .csv to get the list of counter in my application..
public ArrayList COUNTRIES = new ArrayList();
try {
is = res.getAssets().open("country.csv");
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
String line;
while ((line = reader.readLine()) != null)
COUNTRIES.add(line);
}
catch (IOException ex) {
// handle exception
}
finally {
try {
is.close();
}
catch (IOException e) {
// handle exception
}
}