Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7962679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:24:20+00:00 2026-06-04T05:24:20+00:00

From my little android knowledge I understand that android OS can kill my service

  • 0

From my little android knowledge I understand that android OS can kill my service under extreme memory conditions.

I have created a service that returns START_STICKY. The service is meant to run in background.

If android is about to kill my service, will it call onDestroy ?

And when it restarts it would it call onCreate ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:24:21+00:00Added an answer on June 4, 2026 at 5:24 am

    See here, the dev guide. http://developer.android.com/reference/android/app/Service.html#ProcessLifecycle

    onCreate() is only called when the process starts, which can either be the first time the service is running, or if it was killed on restarted, essentially this is called whenever it starts.

    onStartCommand() is called whenever a client calls startService().

    When a service is destroyed / completely stopped, Android is supposed to call onDestroy() on that service. I think it’s possible for that to not happen (e.g. process is killed not through Android system). In the case of a bound service, this is when there are not more active client binders.

    Edit: onCreate() Service starts; onStartCommand()someone uses service; onDestroy()Service is killed / stopped.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From what little understanding of Cassandra I have, it seems that data locality is
I'm developing a little Android app with some square buttons created dynamically from Java
I have a android app that is quite simple it fetches data from the
how can i send email from my android application.please guide me a little bit
I want to write an Android application that can display some data received(polled) from
Trying to understand the Android framework model. I have an application that needs to
Starting from scratch with very little knowledge of .NET, how much ASP.NET should I
I have a little problem to insert from 2 different table's in C# to
I have to implement something that filters websites on Android devices (adult websites etc)
I created a little texture drawing class from observing the LabelMaker example in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.