I am making an application of quotes. So can I bring data (quotes) from a csv file directly in Android? If yes please help!
            Asked
            
        
        
            Active
            
        
            Viewed 79 times
        
    1 Answers
0
            Yes you can easily write data from csv file,as .csv file is Comma Seperated Value file so you can get data by splitting the file by ','
  BufferedReader reader = new BufferedReader(new InputStreamReader(csv_file));
    try {
        String line;
        while ((line = reader.readLine()) != null) {
             String[] RowData = line.split(",");
             data = RowData[0];
             value = RowData[1];
            // do whatever you want to do with the data and value
        }
    }
    catch (IOException ex) {
        // handle exception
    }
finally {
    try {
        csv_file.close();
    }
    catch (IOException e) {
        // handle exception
    }
}
        codeRider
        
- 685
 - 1
 - 5
 - 14