Connecting to The Internet using Background Thread | Android Studio Tutorial

Pubblicato il: 21 novembre 2019
sul canale di: Stevdza-San
4,291
88

🏆 My Online Courses
⭐Discount Coupon: LAUNCH-STEVDZA-SAN
https://stevdza-san.com

🐱‍👤 Wanna become a member? Join!
   / @stevdzasan  

📸 Instagram
  / stevdza_san  


In this video we are going to connect to the internet and download a source code of a web page using Async Task class. Which means that all the connecting and executing functions will be separated from the Main UI Thread, and executed in a Worker/Background Thread instead!

MORE ABOUT ASYNCTASK
AsyncTask enables proper and easy use of the UI thread. This class allows you to perform background operations and publish results on the UI thread without having to manipulate threads and/or handlers.

AsyncTask is designed to be a helper class around Thread and Handler and does not constitute a generic threading framework. AsyncTasks should ideally be used for short operations (a few seconds at the most.) If you need to keep threads running for long periods of time, it is highly recommended you use the various APIs provided by the java.util.concurrent package such as Executor, ThreadPoolExecutor and FutureTask.

An asynchronous task is defined by a computation that runs on a background thread and whose result is published on the UI thread. An asynchronous task is defined by 3 generic types, called Params, Progress and Result, and 4 steps, called onPreExecute, doInBackground, onProgressUpdate and onPostExecute.


In questa pagina del sito puoi guardare il video online Connecting to The Internet using Background Thread | Android Studio Tutorial della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Stevdza-San 21 novembre 2019, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 4,291 volte e gli è piaciuto 88 spettatori. Buona visione!