3. Lifecycle – startService() onCreate() onStart() onDestroy() Service đang chạy Service được start lần đầu Service lại được yêu cầu start trong khi đã chạy rồi Bên ngoài gọi stopService() hoặc service tự stop
4.
5. Lifecycle – bindService() onCreate() onBind() Service đang chạy Activity gọi bindService() để kết nối tới service Bên ngoài gọi unbindService() hoặc kết nối bị ngắt onUnbind() Service không còn kết nối với client nào nữa và cũng ko có context nào start service này onDestroy() Service còn chạy, client muốn kết nối với service onRebind() Lần trước unBind() với client này trả về true
6.
7.
8.
9.
Notas del editor
mong muốn = desire chạy nền = run in background
Ngắt = disconnecetd
nhất thiết = absolutely necessary vận hành = operate tính toán = compute đều đặn = regular kết quả khi nào người dùng cần thì mới xem = the results that the user needs to see