public class Utils {
public static List getMessages() {
//File file = new File(\"file:///android_asset/helloworld.txt\");
AssetMan
getAssets()
method will work when you are calling inside the Activity class.
If you calling this method in non-Activity class then you need to call this method from Context which is passed from Activity class. So below is the line by you can access the method.
ContextInstance.getAssets();
ContextInstance
may be passed as this of Activity class.