Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void fileReading() throws IOException
- {
- File f = new File("/data/data/com.android/files/contacts");
- if(!f.exists())
- {
- Toast.makeText(context, "File not found", Toast.LENGTH_SHORT).show();
- }else
- {
- FileReader fr = new FileReader(f);
- BufferedReader reader = new BufferedReader(fr);
- String st = name;
- while((st = reader.readLine()) != null)
- {
- Toast.makeText(context, st, Toast.LENGTH_SHORT).show();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment