Questions tagged as 'asynctask'

3
answers

Sending UTF-8 by POST does not work

Have the following connection class: public class Conexao { public static String postDados(String urlUsuario, String parametrosUsuario) { URL url; HttpURLConnection connection = null; try { url = new URL(urlUsuario);...
asked by 16.03.2018 / 14:24
0
answers

How to upload web images inside a ListView?

I have a json something like this (simplified the original): [{ image:"http://site.com/imagem.png", title:"Titulo", desc: "descrição" }] I would like to load all the content, including the image inside a ListView in the app, I tried...
asked by 30.08.2017 / 00:27
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
2
answers

Terminate the last AsyncTask before starting another

I'm using AsyncTask (Android App) to get a string json from the server (Comes from a controller from my ASP MVC site). Basically everything that comes from the server goes through this class public class Communications extends As...
asked by 24.05.2017 / 20:19
1
answer

problem with onPreExecute method of AsyncTask - Android Studio

I have this activity that displays the user's score of my application. However, when this activity is called, what should occur is a ProgressDialog being displayed with the message "Searching for Pizza" (according to onPreExecute) and when the g...
asked by 09.06.2017 / 16:40
0
answers

Context error in method inside the class that extends asynctask

Hello, I gave the complete code. The compilation error occurs in the playmusic class. Thank you for your attention! public class Agendador { //Toolkit toolkit; Timer timer; public Agendador() { // toolkit...
asked by 17.05.2017 / 22:58
1
answer

Return String from onPostExecute ()

I tried to use @ramaral's hint Original post but my code is with compilation errors that I do not know how to delete. 1-In the interface declaration the error appears:    unexpected interface . 2-Should the onPostCompleted method b...
asked by 15.05.2017 / 13:26
0
answers

How to RECORD android data in MySQL using webservices (AsyncTask)?

I have an android application that has several buttons on different screens, I should attach the clicked buttons and send to MySQL. li about webservices ( link ) and you need an AsyncTask to make that connection. banco_mysql.java...
asked by 25.04.2017 / 15:23
1
answer

GridView is not updated (Android)

I am creating an app that when it launches it executes an asynchronous task that makes a query to an api, when picking up the result it inserts in the adapter. I have tried it in several ways, but only the images appear when I select it in the s...
asked by 02.11.2016 / 20:42
1
answer

publishProgress only updates Progress Dialog at the end of doBackgorund

I am not able to update the progress of my progress dialog during the process of inserting into the SQlite database from a JSON array. The process occurs without problems, however, the update only happens at the end, when the insertion is fin...
asked by 01.10.2016 / 01:16