Last active
February 19, 2019 21:17
-
-
Save dynoChris/8ad0a3d5268dcd847814661c42c739da to your computer and use it in GitHub Desktop.
How to read text file from Internal Storage in Android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String filePath = "/data/data/com.example.vadym.test1/filename.txt"; | |
| String all = ""; | |
| try { | |
| BufferedReader br = new BufferedReader(new FileReader(filePath)); | |
| String strLine; | |
| while ((strLine = br.readLine()) != null){ | |
| all = all + strLine; | |
| } | |
| Log.d(Utils.TAG, all); | |
| } catch (IOException e) { | |
| Log.e("notes_err", e.getLocalizedMessage()); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment