im trying to display items in a list view based on my raw query. Basically when the user click a list item from screen 1, it adds its name as an extra. Then in the next screen im trying to see if my other table in the datbase has any开发者_运维技巧 fields with that same name.
table 1 table2 name name
check to see if name(table 1) matches name(table 2)
cant get it to match at all.
any help would be brilliant
try{
File f = new File(Environment.getExternalStorageDirectory()+"/filename.txt");
fileIS = new FileInputStream(f);
BufferedReader buf = new BufferedReader(new InputStreamReader(fileIS));
String readString = new String();
//just reading each line and pass it on the debugger
while((readString = buf.readLine())!= null){
Log.d("line: ", readString);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e){
e.printStackTrace();
}
This is how you can read the file. Just make a copy of this file and save it to your /data/data/PACKAGE/folder
精彩评论