java - Read a .txt file of SD in Android -


this question has answer here:

my problem software i'm trying make this; when save information, it's saved code:

code save

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

Popular posts from this blog

matlab - Deleting rows with specific rules -

php - MySQLi multi_query results for later use -