No video

Running Android tasks in background threads | 34 | Android Development Tutorial for Beginners

  Рет қаралды 15,749

Coding Pursuit

Coding Pursuit

3 жыл бұрын

Running Android tasks in background threads | 34 | Android Development Tutorial for Beginners
𝐃𝐨𝐧𝐚𝐭𝐞 𝐨𝐫 𝐁𝐮𝐲 𝐦𝐞 𝐂𝐮𝐩 𝐨𝐟 𝐂𝐨𝐟𝐟𝐞𝐞 : paypal.me/codingpursuits
so hello guys welcome back. in this video, We are going to learn about the threading in Android application. So stay tuned and watch the video till the end.
so by default Android application completes its task and functionality in a single process or thread. It is also called the main thread. Usually the tasks and the functionalities are very smaller and it completes within no time. but suppose a case in which the task is length example Android application have to download a very large file. so if we are going to to download the file in the single thread or main thread the all functionality will be halted. because Android application will have to work to download file first and then perform next task like you want to type or you want to to go to another screen you cannot go to another screen because Android application is easy to download file so after downloading that file you will be able to perform the next task like navigating to another screen or order something.
So we do not want an application to freeze or halted at this moment we want smooth User experience. So to handle this case we start another process or thread which is also called background thread because it is running in the background and we allocate it the responsibility to download file. Meanwhile, the main thread will give the user the facility to navigate to another screen or to perform other actions so when the download file is completed our background thread will notify us that the file is downloaded and the background thread will be finished and we will notify the user that his his file or task is completed in thread handler. this mechanism is called background threading. so we can run one or multiple threads in Android application and allocate our length or time consuming task to these processes or thread.
Now that's come towards the treads handler, so when our process completes its task ok it will send a message to the thread Handler so that we can be able to take specific decision or update UI according to the the message sent by the threads. this we override called Handle message so now let's send a message upon completion the task and display it in the textview we just have created
background thread android
background thread in android example
kotlin background thread
background threading
run service in background thread android
run on background thread android kotlin
how to run background service continuously in android
android background task
asynctask android
android executor example
android handler
android thread example
Android Development
Android Development Tutorial for Beginners
• Running Android tasks ...

Пікірлер: 20
@MoiezKhanMk
@MoiezKhanMk Жыл бұрын
Bro you helped me with the biggest thing in my new production app that im launching, Thanks alot
@Sam-su4sk
@Sam-su4sk 2 жыл бұрын
Perfect explanation. Thank you so much
@fbcbxcfb
@fbcbxcfb 2 жыл бұрын
Great explanation, thanks dude!
@adityashukla4059
@adityashukla4059 3 жыл бұрын
Just now discovered it ...and it is great
@codingpursuit914
@codingpursuit914 3 жыл бұрын
Thanks for appreciation
@subhambikash
@subhambikash 3 жыл бұрын
Totally love it
@programmertony6061
@programmertony6061 3 жыл бұрын
Thank you so much! Your are great.
@codingpursuit914
@codingpursuit914 3 жыл бұрын
You are welcome. Stay tuned
@hilaltube4693
@hilaltube4693 3 жыл бұрын
Thanks men...
@codingpursuit914
@codingpursuit914 3 жыл бұрын
Welcome!
@Hanna-zj1gk
@Hanna-zj1gk 2 жыл бұрын
This tutorial is very helpful. May I know how how to create second application which will run in the background service when first application is processing without interacting of first app?
@codingpursuit914
@codingpursuit914 2 жыл бұрын
Will upload soon
@charchitmishra4541
@charchitmishra4541 2 жыл бұрын
Thank You Brother !
@codingpursuit914
@codingpursuit914 2 жыл бұрын
Welcome
@dasyus
@dasyus Жыл бұрын
GRACIAS JODER
@sujith5441
@sujith5441 2 жыл бұрын
Why we need handler when we can use runOnUiThread method?
@sauravgaur8756
@sauravgaur8756 3 жыл бұрын
Will it work even when the app is destroyed (not In recent stack) ? If not can you please tell me the solution for that too. This video helped me thanks🙏
@pavolsvancarek8151
@pavolsvancarek8151 2 жыл бұрын
Do you know the solution already? I would like to know it too :D
@buster190884
@buster190884 2 жыл бұрын
your handler is deprecated ! please try showing people the right way
@codingpursuit914
@codingpursuit914 2 жыл бұрын
I eill check it . Thanks for your suggestions
Can I Become an Android Pro with Kotlin in Just 4 Weeks?
13:24
Runnables Threads and Handlers in Android
10:07
Mafia Codes
Рет қаралды 36 М.
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 60 МЛН
НЫСАНА КОНЦЕРТ 2024
2:26:34
Нысана театры
Рет қаралды 1,6 МЛН
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 130 МЛН
Как устроен Android и его приложения.
30:29
Sergey Arkhipov Java Tutorials
Рет қаралды 20 М.
Bound Services on Android
43:00
CodingWithMitch
Рет қаралды 61 М.
Explained - Android UI thread/main thread
6:34
Codetutor
Рет қаралды 68 М.
How to create a background service in Android.
9:02
Be Codey
Рет қаралды 15 М.
AsyncTasks | What When How in Android
16:59
Mafia Codes
Рет қаралды 18 М.
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 60 МЛН