java - AsyncTask status doesn't state to FINISHED -


Issue: AsyncTask does not state when the state is finished, but after the code is executed in doInBackground () The application works slowly after starting this work, it is too long)

I need to be refined what have I done?

Thanks

Code (Shortcut):

  MyTask MT; Class MyTask Async Task & Lt; Zero, zero, zero> {Int myProgressCount; @ OverEride Protected Zero at PreExecute () {super.onPreExecute (); Toast. MakeText (DeviceUARTContext, "Probe Start Progress Bar", Toast. LNNHHLANG). Show (); } @ Override Protected Voice Doine Background (Zero ... Parameter) {// Function Return of the Code; } @Override Secure Zero on postexec (zero result) {super.onPostExecute (results); Toast. MakeText (DeviceUARTContext, "onPostExecute End Progress Bar", Toast.LNGTH_LONG). Show (); Toast. Make text (DeviceUARTContext, "asynctask status:" + mt.getStatus (), toast .LENGTH_LONG). Show (); // here should be mt.getStatus () "finished"}} ReadDataBut = (button) view.findViewById (R.id.button12); ReadDataBut.setOnClickListener (New view onClickListener) {click on Public Zero (see V) {mount = new My Task (); mt.execute ();}});  
  protected void onPostExecute (zero result) {super.onPostExecute (results) ; Toast. MakeText (DeviceUARTContext, "onPostExecute End Progress Bar", Toast.LNGTH_LONG). Show (); Toast. Make text (DeviceUARTContext, "asynctask status:" + mt.getStatus (), toast .LENGTH_LONG). Show (); If your toast "asynctask status:" is being displayed which means that you are already onPostExecute (), that means your doInBackground () method has expired and this toast will be over when it is displayed You have terminated the execution of () method on PostExecute. 

See this link:

It clearly states that after nuclear non-proliferation () has changed the status of its execution and you are showing toast the same method Before it is finished and the walking thus returned to the end of PactActified ().


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -