I don't know why getContext() is null when I am extending my class
from ServiceTestCase<<MyService>

Thanks,
Androiduser.

On Sep 8, 10:06 am, androiduser mobile <[email protected]>
wrote:
> Hi Mark and joyband,
>
> Thanks for your help. I am using this code inside one of my service
> test cases and getContext().getResources() is null to get theassets.
>
> 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 -- 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to