I'm having difficulty getting this part done, I've followed all the steps of several sites, I've reached the end and the application reads the file. Anyone know what might be happening ??
I'm having difficulty getting this part done, I've followed all the steps of several sites, I've reached the end and the application reads the file. Anyone know what might be happening ??
Good afternoon Leandro,
I found this article that might be relevant:
The following code will be from the response given as correct:
public final List<String[]> readCsv(Context context) {
List<String[]> questionList = new ArrayList<String[]>();
AssetManager assetManager = context.getAssets();
try {
InputStream csvStream = assetManager.open(CSV_PATH);
InputStreamReader csvStreamReader = new InputStreamReader(csvStream);
CSVReader csvReader = new CSVReader(csvStreamReader);
String[] line;
// throw away the header
csvReader.readNext();
while ((line = csvReader.readNext()) != null) {
questionList.add(line);
}
} catch (IOException e) {
e.printStackTrace();
}
return questionList;
}
I hope I have helped.