开发者

android raw query

开发者 https://www.devze.com 2023-02-12 23:35 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号