Hi Mark and joyband, Thanks for the help. I am using this code inside one of my service test cases and getContext().getResources() is null to get the assets.
Thanks, Androiduser. On Sep 4, 6:48 pm, joyband <[email protected]> wrote: > I tried your code in my Eclipse,it looks fine. > ins = getResources().getAssets().open("tmp.txt"); > byte[] buffer = new byte[1024]; > int length = 0; > while((length = ins.read(buffer)) > 0){ > Log.d(LOG_TAG, new String(buffer,0,length)); > > > > }- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

