Read many questions about the location of assets. Not any of these solutions uses a function to get the assets foldername/dirname/pathname, only hard-coded like: "file:///android_asset/"
.
For example to get a path you can do something like this:
String sFilesPath = mContext.getFilesDir().getPath();
Is there a function or variable in Android to get the full path to the assets folder?
Copyright Notice:Content Author:「Codebeat」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30293896/get-assets-directory-from-an-android-function-name-or-variable-instead-of-hard-c