public class AycanClass extends AsyncTask<String, Void, String> implements IAppointments {
Activity activity;
public AycanClass(Activity activity){
this.activity = activity;
}
@Override
protected void onPostExecute(String result) {
super.onPostExecute(result);
activity.setFilters(value);
}
}
Now in my MainActivity class i have method like this.
public void setFilters(String result){
}
I am not able to call this method.
The method setFilters(result) is undefined for the type Activity
Edit: make your activity implement an interface that will contain that method.
And the activity should look like this:
And just pass a FilterableActivity as a parameter to the Asynctask.