Questions tagged as 'asynctask'

1
answer

Thread or Asynctask? When and which one should I use?

When is it recommended to use threads ? At what time is it advisable to use AsyncTask ? I would like to know what to use and what time it is needed.     
asked by 08.06.2015 / 17:07
4
answers

What are the main differences between Handler, Thread and AsyncTask? [duplicate]

The documentation for Android may end up being a bit confusing for those who are starting to understand better what are the differences between Handler , Thread and AsyncTask . Handlers are background Threads...
asked by 25.08.2015 / 13:20
1
answer

Trigger AsyncTask class exception

The class below is responsible for getting data from a WCF Rest service: public class MyAsyncTaskGeneric<T> extends AsyncTask<String, Void, T>{ private final Class<T> typeGeneric; public MyAsyncTaskGeneric(...
asked by 10.04.2015 / 21:57
1
answer

Call an asynchronous function in an ActionResult?

How to call an asynchronous function on a non-asynchronous controller, to be clearer follows a situation: I have a form that when saving it needs to save data in the database and simultaneously send an email notifying a user that such action...
asked by 04.03.2016 / 13:37
1
answer

How to return more than one value using an asyncTask in android?

In short, my class that extends an AsyncTask, downloads a series of data of type byte, then I need to perform some calculations with that data, and finally return all these values to my MainActivity. The code is summarized as follows: class...
asked by 22.06.2015 / 13:32
2
answers

Android ProgressDialog does not appear

I'm trying to show a ProgressDialog in the process of downloading a binary file, however it does not appear, and I do not get any error as well. Briefly explain how I have structured code In my MainActivity I define a button to get this file...
asked by 25.06.2015 / 14:36
1
answer

Change the HttpParams code to httpurlconnection

I have a code that connects json to a mysql database, but HttpParams is obsolete in the java version I'm using, so I'd like to know how to do it or how best to put new parameters and keep that format to get the data, this is a login and password...
asked by 20.04.2016 / 16:19
1
answer

AsyncTask Android

I have a "Runnable" method that executes on a new Thread a certain method to update my list. Every time I call this "Runnable", I'm creating a new Thread, which for me is not very positive ... How can I do the same thing using an AsyncTask...
asked by 29.06.2015 / 21:11
1
answer

Await ignored in asynchronous method c #

I need to use the return of an asynchronous method for validation but even with the use of "await" the method is still running before I get the function return. var teste = await new VendaService().EnviarVendaParaServicoCentral(new List<...
asked by 22.09.2015 / 19:15
1
answer

AsyncTask causes a fatal error while executing the InBackground () method [closed]

The code does not display any errors, however when I run it, it stops and displays a Fatal Run-time error in the AsyncLoadXMLFeed class that extends AsyncTask. Follow the AsyncLoadXMLFeed class code inside SplashActivity public class AsyncL...
asked by 31.05.2015 / 13:27