I make android application that read textfile.txt from resource/raw. And it’s work fine. Here is the code:
BufferedReader bufferreader = new BufferedReader(new
InputStreamReader(getResources().openRawResource(R.raw.textfile)));
String bufferLine;
String tempText = "";
try{
while ((bufferLine = bufferreader.readLine()) != null){
tempText = tempText + bufferLine;
}
} catch (IOException e){
}
Now, I need also to access this raw resource textfile by modify(write) or delete the content. Is there anyway to do it on android ?
Use the external storage to store the file after you have modified it.
How you use the external storage depends a bit on what version you are targeting, but it’s explained in the documentation that I linked to.
Files that you place in the external storage associated with your application will be deleted if your application is uninstalled and your target version is API level 8 or above.