java - Read a .txt file of SD in Android -
this question has answer here:
- android reading text file 3 answers
- how load text file textview [duplicate] 3 answers
my problem software i'm trying make this; when save information, it's saved code:

with this, information saved in text in sd, couldn't read information. i've tried several ways.
i want save content of txt in string put in textview.
try { string mydata ; fileinputstream fis = new fileinputstream(your file name); datainputstream in = new datainputstream(fis); bufferedreader br = new bufferedreader(new inputstreamreader(in)); string strline; while ((strline = br.readline()) != null) { mydata = mydata + strline; } in.close(); } catch (ioexception e) { e.printstacktrace(); } // play mydata..it's file content
Comments
Post a Comment