Anthony,

 Have both the activities implement a common interface and pass the 
interface the asynctask.

rkapps
https://play.google.com/store/apps/details?id=com.rkapps.financeFree


On Tuesday, August 7, 2012 9:21:33 AM UTC-7, anthony vialleton wrote:
>
> Hello everybody,
>
> I currently poses the following problem:
>
> I have a class: DownloadDataNews wich extends from `AsyncTask<Void, 
> Integer, ArrayList<HashMap<String, String>>>` wich recovered my data from 
> my web service.
> I made the DownloadDataNews constructor to take a context in argument :
>
>     public DownloadDataPromotions(Context context) 
>     {
>     this.context = context;
>     }
>
> TabNewsJSONParsingActivity wich extends from ListActivity is my class that 
> displays in list what I receive from my DownloadDataNews.
>
> The worries come now when I'm in another Activity, I have to set in 
> DownloadDataNews argument: "this"
> => New DownloadData(this).execute();
>
> But "this" corresponds to the place where I execute it and i have a 
> problem when i call it from an other Activity to ..
> I would have to be able to call it in an other way like making a call to 
> the reference context TabNewsJSONParsingActivity like this (in order to 
> make the change or refreshing from an other activity):
> => `New 
> DownloadData(ContextReferenceToTabNewsJSONParsingActivity).execute();`
>
> someonecan help me ? I heard about Handler but dont know if it'll run..
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to