hi i want the path to a file in my android assets folder.
How I get the path as String?
I try with :
String path = getClass().getClassLoader().getResource("file:///android_asset//psp.pdf").getPath();
I need the path as String.
hi i want the path to a file in my android assets folder.
How I get the path as String?
I try with :
String path = getClass().getClassLoader().getResource("file:///android_asset//psp.pdf").getPath();
I need the path as String.
The only ways to access an asset are:
Via open()
on AssetManager
, in which case your path is psp.pdf
Via file:///android_asset/
in WebView
, in which case your path is file:///android_asset/psp.pdf
An asset is neither a file on a filesystem nor something that you get from a ClassLoader
.