Quantcast
Channel: Adobe Community : All Content - AIR Development
Viewing all articles
Browse latest Browse all 2954

FREWrongThreadException inside AsyncTask in Android

$
0
0

Create a FREArray inside a AsyncTask causes "FREWrongThreadException" exception in Android code. Do you know why?

 

Inside call() method

 

new AsyncTask<Void,Void,Void>()

  {

@Override

  protected Void doInBackground(Void... params) {

//anything

  return null;

  }

 

 

protected void onPostExecute(Void result) {

FREArray resultAIR = null;

  try {

  resultAIR = FREArray.newArray(1);

  } catch (IllegalStateException e1) {

  e1.printStackTrace();

  } catch (FREASErrorException e1) {

  e1.printStackTrace();

  } catch (FREWrongThreadException e1) {

  e1.printStackTrace();

  }

 

//anything

}

}

 

thanks!


Viewing all articles
Browse latest Browse all 2954

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>