Android getAssets() method throws NullPointerException

view story

http://stackoverflow.com – I'm trying to get assets of my app from Service and i get nullpointexception. I found fiwe articals about but i don't get where my mestace. Where is the code: public class OCRService extends IntentService{ private static final String TAG = "OCRService"; public static final String DATA_PATH = Environment.getExternalStorageDirectory().toString() + "/SimpleAndroidOCR/"; public OCRService() { super("OCRService"); String path = new String(DATA_PATH + "tessdata/"); File dir = new File(path); if (!new File(path).exists() && !dir.mkdirs()) { Log.e(TAG, "ERROR: Crea (HowTos)