Which of the starting, running, destroyed, or paused is not a state - ProProfs Discuss
Advertisement

Which of the starting, running, destroyed, or paused is not a state in Android service lifecycle?

Asked by MarkusRibasTest, Last updated: Apr 12, 2024

+ Answer
Request
Question menu
Vote up Vote down

6 Answers

R. Hunter

R. Hunter

R. Hunter
R. Hunter

Answered Oct 19, 2020

Six callbacks are applied to the Android service lifecycle. These states include: onCreate(), onStart(), onResume (), onPause(), onStop(), and onDestroy(). onCreate is where you modify your activity. It is called only once in activity life. onStart() is when the activity enters the started state; the call makes the activity visible to the user and becomes interactive.

onResume() is when the activity enters a state in which the app intermingles with the user. The app remains in this state until something transpires to take the spotlight away from the app. onPause() indicates that the system is no longer paramount. Pause means that operations should not continue. onStop() may occur when a newly introduced activity covers the entire screen, and the activity has stopped running.

onDestroy() is finishing or dismissing the activity or system is temporarily destroying the activity due to structure shift. This scenario is where the lifecycle components can clean up anything it needs before the activity being destroyed. All of these states represent the Android lifecycle.

upvote downvote
Reply 

Yashu Dhiman

Yashu Dhiman

I'm a professional writer. I express through my blog and I keep searching for fresh content over the Internet.

Yashu Dhiman
Yashu Dhiman, Content Writer, Diploma in Literature, Noida, India

Answered Oct 05, 2020

The correct answer to this question is paused. Starting, destroyed, and running states in the lifecycle of Android services. startService() has many services that are started by this command. These services include created, destroy, run, and start. Another command used is bindService(), which starts services like destroy, bind, unbind, and create.

Services are started when a part of the application starts the command startService(). It is run in the background, which is done when the service has already started. The application is running in the background all the time, regardless if it is destroyed. bindService() makes a service become BOUND.

upvote downvote
Reply 

G. Horace

G. Horace

G. Horace
G. Horace, Content Developer, Chicago

Answered Sep 28, 2020

There is none which is not a state in android service lifecycle. Starting and running are part of the active state. There are four states, which are active, paused, stopped and destroyed.

Each time it is an active state, it is clear to the user, and the user can relate with it.

A paused state is a state when the user cannot interrelate with the activity until he/she is done with the present view.

Each time a different activity is launched over the new one or when the user taps the home button. However, when the activity is taken to a stopped state, the activity becomes unseen, nevertheless, it is not destroyed.

A destroyed state is when the operator taps the back button, or Android Runtime chooses to regain the memory selected to an activity in the paused or stopped state, it moves into the destroyed state. The activity is out of memory and it will be unseen to the operator.

upvote downvote
Reply 

C. Hughes

C. Hughes

Learning new things along with my music

C. Hughes
C. Hughes, Musician, MA, Bradford

Answered Sep 25, 2020

Out of the options listed: starting, destroyed, running, and paused, paused is not a state in the Android service lifecycle. The services that are started by startService() are created, running, start, and destroy, while the services that are created by bindService() are bind, unbind, create, and destroy.

A service is STARTED when the component of an application, an activity, for example, commences it by calling startService(). A service can now start to run indefinitely in the background after service must have been started, whether the component that started is destroyed or not.

A service is BOUND when the component of the application binds to it through the calling of bindService(). A bound service usually offers a client to server interface that permits the components to interact with the get results, get requests, service, and also do so through processes with IPC, which means Interprocess Communication.

upvote downvote
Reply 

G. Deacon

G. Deacon

Loves to build things that last longer.

G. Deacon
G. Deacon, Civil Engineer, B.E(Bachelor of Engineering), Trenton, New Jersey

Answered Sep 21, 2020

Starting and running are both part of the Active state.

• The four official states are active, paused, stopped, and destroyed.

• When in an active state, it is visible to the user, and the user can interact with it.

• A paused state is when the user cannot interact with the activity until he or she is finished with the current view.

• When a new activity is launched over the current one or when the user hits the home key.

• When the activity is brought to a stopped state, the activity becomes invisible, but it is not destroyed.

• A destroyed state is when the user hits a back key, or Android Runtime decides to reclaim the memory designated to an activity in the paused or stopped state, it goes into the destroyed state.
The activity is out of memory, and it will be invisible to the user.

upvote downvote
Reply 

MarkusRibasTest

MarkusRibasTest

MarkusRibasTest
MarkusRibasTest

Answered Mar 02, 2019

Paused
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.