I my android application,i would like to read a text file which is placed on the sdcard. Read the file to search for a string: \"some string\" and would like to get the valu
File file = new File(your file);
try {
FileInputStream in = new FileInputStream(file);
int len = 0;
byte[] data1 = new byte[1024];
while ( -1 != (len = in.read(data1)) ){
if(new String(data1, 0, len).contains(Your String))
//do something...
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}