Issue
I tried using raw resource folder in order to store a text file. (instead of hard coding it ). The text is in hebrew so it's RTL(I don't think it's the problem). The problem is that instead of the text I have inside I get only symbols.(����.)
This is how I get the text inside the resource file
InputStream inputStream = this.getResources().openRawResource(id);
byte[] buffer = new byte[1024];
int bufferLength = 0;
String name = getNameByID(id);
FileOutputStream fos = openFileOutput(name,MODE_PRIVATE);
try {
while ((bufferLength = inputStream.read(buffer)) > 0){
fos.write(buffer,0,bufferLength);
}
} catch (IOException e) {
e.printStackTrace();
}
Any suggestions?
Solution
Well I found the solution... Delete the files and put them agin. If that fails,Try to paste data manually(CTRL+V).
Answered By - Shahar Levy
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.