I'm trying to open up a file in Android Studio. I created an asset folder that has the path:
app_name\app\src\main\assets\file.csv When I try to open it using
FileReader file = new FileReader("assets/PlayerDB.csv"); I get an error that file is not found. To try and figure out the location of the root directory for getting files, I used the following:
File f = new File("test/test.txt"); String Path = f.getAbsolutePath(); Log.v("File Path",Path); However, this just prints "test/test.txt" to the log. Any ideas on how to get absolute path to work & how to open the file from the assets folder?
Thanks!