I have a class that goes to decrease the image but I’m currently on AsyncTask, now I want to replace it because AsyncTask is now deprecated.So can someone help me out with a workaround Here is my code: Answer You could change your decreaseImageSize to accept a callback as a parameter. In this case, the function will no longer need
Tag: android-asynctask
Retrieve Context from a fragment
I created a class to retrieve comments from a JSON encoding from a PHP file. This class, extends from AsyncTask: public class RecuperarComentarisFoto extends AsyncTask{ …
Possible to determine size of file to be downloaded?
I currently have the following code which reads a file located on the web and writes it to a file on the phone: Does anyone know whether it is possible (using the setup above or otherwise) to determine the total number of bytes which are to be read before commencing with the download (in order to publish percentage progress to
How to check internet access on Android? InetAddress never times out
I got a AsyncTask that is supposed to check the network access to a host name. But the doInBackground() is never timed out. Anyone have a clue? public class HostAvailabilityTask extends AsyncTask<…