Android Developer Question:

Do you know what are Handlers?

Tweet Share WhatsApp

Answer:

Handlers are objects for managing threads. It receives messages and writes code on how to handle the message. They run outside of the activity’s lifecycle, so they need to be cleaned up properly or else you will have thread leaks.
Handlers allow communicating between the background thread and the main thread.
A Handler class is preferred when we need to perform a background task repeatedly after every x seconds/minutes.

Download Android Developer PDF Read All 56 Android Developer Questions
Previous QuestionNext Question
What is the build process in Android?Do you know what is ANR, and why does it happen?