Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Niklas Karlsson
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

protected void onPreExecute() {
// Shows Progress Bar Dialog and then call doInBackground method

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

protected void onProgressUpdate(String... progress) {
// Set progress percentage

protected String[] onPostExecute(String file_url ) {

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


Is there any tutorials?

What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!