• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

String[] IN doInBackground? AND RETURN THIS..??

 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I have a problem, I have only used asynctask for "singel return items before.

But now I want to the following:

send some "pree setings in a constructor."
then in a asynktask so put result in a String array..
and sent it to the UI..

but I dont know how to declare this.. :-(

class ASYNKsparaNedMedGeo extends AsyncTask<String, String, String[]> {
some strings...

public ASYNKsparaNedMedGeo("some in-variabels..") {
this.skaGatuadressUppdatreras = skaGatuadressUppdatreras;
...
// TODO Auto-generated constructor stub
}

@Override
protected void onPreExecute() {
super.onPreExecute();
// Shows Progress Bar Dialog and then call doInBackground method
showDialog(progress_bar_type);
}

@Override
protected String[] doInBackground(String... f_url) {
....
siteArray = getSiteInfoFromSitesListArrayNew(elementval);
return null;

protected void onProgressUpdate(String... progress) {
// Set progress percentage
prgDialog.setProgress(Integer.parseInt(progress[0]));
}

protected String[] onPostExecute(String file_url ) {

dismissDialog(progress_bar_type);
Toast.makeText(getApplicationContext(), "siteInfo : " + siteInfo, Toast.LENGTH_LONG).show();
return siteInfo;
}

}

Is there any tutorials?

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic