Câu hỏi phỏng vấn Android
Câu hỏi

What is the difference between Service & Intent Service ?

Câu trả lời

The main differences between Service and IntentService in Android are:

  • Service runs on the main thread of the application, while IntentService creates a worker thread to run the service[1][3][5].
  • Service needs to manually stop itself using stopSelf(), but IntentService automatically stops itself when there are no more intents to process[1][3].
  • Service can be started from any thread, but IntentService can only be started from the main thread[1][5].
  • Service allows binding from other components, but IntentService cannot be bound by default[3].
  • Service processes intents concurrently, while IntentService processes intents sequentially in a queue[1][3].
  • Service is more flexible and allows more control over the service lifecycle and threads, whi...
middle

middle

Gợi ý câu hỏi phỏng vấn

middle

What is Handler and what is it used for?

junior

What is Context on Android?

middle

How would you communicate between two Fragments?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào