I want to call a method called getHoroscope() from an AsyncTask, from another class, I'm trying this
String sentence, signo="geminis"; sentence = new ExtendedActivity.Parse().getHoroscope("daily",signo); But I get error "ExtendedActivity is not an enclosing class". Can you help me?
My ExtendedActivity:
public class ExtendedActivity extends BaseActivity { (...) public class Parse extends AsyncTask<String, Void, String> { private final ProgressDialog dialog = new ProgressDialog(ExtendedActivity.this); @Override public String doInBackground(String... params) { String option, type, dat, site="", description="", s="";; //get the user option Bundle extras = getIntent().getExtras(); option = extras.getString("OPTION"); type = extras.getString("TYPE"); description = getHoroscope(type, option); return description; } public String getHoroscope(String type, String option){ String description="", site; (...) } }
AsyncTask.execute?: