So I’m following along with this tutorial, and I’m stuck. In Eclipse, I’m getting an error saying that “The method getSystemService(String) is undefined for the type UserItemAdapter”. Any idea how I can get this from a Context? I’m kinda confused, I haven’t done much with with Contexts.
Share
If your enclosing Activity is
MyActivity, useMyActivity.this.getSystemService(). This will access the enclosing Activity (which is a Context).EDIT: or
getContext().getSystemService(see http://developer.android.com/reference/android/widget/ArrayAdapter.html#getContext%28%29)