Services in Android
Services in Android
UNIT-III
SERVICE IN ANDROID
• Android service is a component that is used to
perform operations on the background such
as playing music, handle network transactions,
interacting content providers etc.
•These states dictate what the activity is currently doing and how it interacts
with the user and system resources.
•Active/Running: When an activity is in the foreground and the user is interacting with it.
This corresponds to the onResume() state in the lifecycle.
•Paused: When the activity is still visible but not in the foreground (e.g., when a dialog
appears). This corresponds to the onPause() state.
•Stopped: When the activity is completely obscured by another activity and is no longer
visible. This corresponds to the onStop() state.
•Destroyed: When the activity is finished or terminated by the system. This corresponds
to the onDestroy() state.