/ Published in: Java
put your text files into the res/raw folder.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
StringBuilder contents = new StringBuilder(); try { try { while (( line = input.readLine()) != null){ contents.append(line); contents.append(sep); } } finally { input.close(); } } Log.e(TAG, "Couldn't find the file " + resourceID + " " + ex); return null; } Log.e(TAG, "Error reading file " + resourceID + " " + ex); return null; } return contents.toString(); }