I have class that extends AsyncTask
class and I create instance of this class of this AsyncTask
class uses data comes from GPS driver from the method
public void onLocationChanged(Location location) {}
from interface LocationListener
.
I want to know why why the application to execute AsyncTask
instance inside the method onLocationChanged()
?! As I want to execute something in background only when the location is changed
make a constructor for your asyncTask , with Location object as argument.