Colleagues, I have the such question: 1. In my first class I have the
public class parseYouTubeAndYahoo extends AsyncTask
I guess your parseYouTubeAndYahoo
class is an inner class in class MainActivity
, in Java, you should instaniate an object of the inner class by new MainActivity().new parseYouTubeAndYahoo()
, so call that method like this new MainActivity().new parseYouTubeAndYahoo().execute("someURL");
I also guess MainActivity
extends the Activity
class, so I think the answer should be this.new parseYouTubeAndYahoo().execute("someURL");
when you just call this method inside your MainActivity
class.