Reputation: 312
I want to list all files in folder which is in assets. But new File("/android_asset/instagram").exists()
always returns false.
File instagram = new File("/android_asset/instagram")
for (File lookUpFile : instagram.listFiles()) {
String filterName = FileUtils.removeExtension(lookUpFile.getName());
filterName = Strings.capitalizeAndCopy(filterName);
GPUImageLookupFilter lookupFilter = new GPUImageLookupFilter();
lookupFilter.setBitmap(BitmapFactory.decodeFile(lookUpFile.getAbsolutePath()));
filters.addFilter(filterName, lookupFilter);
}
Upvotes: 0
Views: 1038
Reputation: 245
Try to access the file using asset manager. Try to get the list of files and make sure its working.
AssetManager assetManager = getAssets();
String[] files = assetManager.list("");
Upvotes: 3