Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- File jfile = new File("file://android_asset/"+filename); //tried to get the URI of the assets folder
- JarFile file = new JarFile("assets/"+filename); //tried assuming the assets folder is root
- fd = am.openNonAssetFd( filename); //tried getting my file as an non asset in the assets folder (n.b. it is definitely there)
- fs = am.open(filename, AssetManager.ACCESS_BUFFER); //tried loading it as an asset
- String fullfilename = "file:///android_asset/"+filename;
- File jfile = new File(fullfilename);
- if (jfile.exists())
- {
- return new FileInputStream(jfile);
- }
- else
- {
- return null; //the file does exist but it always says it doesn't.
- }
- File jfile = new File("file:///android_asset/"+filename);
Add Comment
Please, Sign In to add comment