So, as I understand it, accessing the Activity object is a bad idea
from inside an AsyncTask's doInBackground() method because, due to
rotation or other configuration changes, the Activity that created the
AsyncTask can go away and be replaced by another one while
doInBackground() is running.

However, inside my doInBackground() implementation, I'd like to access
some string resources that contain configuration information (like the
URL of the server my background task needs to communicate with).
Normally, I'd get to those string resources via the Activity's
getString(R.string.xxxxx) method, but that's a no-no here.

Is there another good way to get at those strings?  Or an alternative
best practice for this situation?

Thanks.

-- 
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