public class Utils { public static List getMessages() { //File file = new File(\"file:///android_asset/helloworld.txt\"); AssetMan
getAssets()
is only works in Activity in other any class you have to use Context for it.
Context
Make a constructor for Utils class pass reference of activity (ugly way) or context of application as a parameter to it. Using that use getAsset() in your Utils class.