Hello everyone) I have such a task: From the activity I launch the upload of a single JSON-chick on a button via AsynkTask. I need to launch a progress bar, make progressBar.setCanceble(false); until the load happens (successfully). After a successful download, the activity should start, which will already do the parsing values, since I want to, but I do not know how to do it.
Question: where to initialize - new ParseTask().execute(); , to start it as if to say ... Probably, in a separate thread. And so that nothing else is included, you know what I mean ?. For example, a scanner device beacons.
new ParseTask().execute();- runs thedoInBackground()method in a separate thread. - Yuriy SPb ♦onPostExecute()method in which it is necessary to respond to the arrival of data. Execute code that requires data immediately after callingnew ParseTask().execute();is impossible. Totally. You need to write logic in order to take this into account - Yuriy SPb ♦