I am changing the string constant of a file name from InternalString to Location. This is causing the following errors:
12-01 12:58:47.555: W/System.err(6405): java.io.FileNotFoundException: /data/data/com.example.app3/files/Location: open failed: ENOENT (No such file or directory)
code causing error:
String FILENAME = "Location";
try {
InputStream fis = openFileInput(FILENAME);
byte[] dataArray = new byte[fis.available()];
while (fis.read(dataArray) != -1)
{
String text = new String(dataArray);
tvCoordinates = (TextView) findViewById(R.id.tvcoordinates);
tvCoordinates.setText(text);
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}