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

  • Home
  • SEARCH
  • 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 4578336
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:28:14+00:00 2026-05-21T20:28:14+00:00

My app runs a geolocalisation service that the user can active or disactive by

  • 0

My app runs a geolocalisation service that the user can active or disactive by a toggleButton. To check the status of the service, I write a boolean in the Shared Preferences. I listen the beginning of the service and the end of it thanks to the onDestroy() of my service.

My problem is that: When the user kill the service with the “advanced task killer”, I can’t know that the service is killed, the onDestroy is not called !

How can I deal with that?

Thanks for your help.

Florent

  • 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-05-21T20:28:14+00:00Added an answer on May 21, 2026 at 8:28 pm

    When a process is killed (using ATK or android’s own force stop button, or the function here), it is immediately purged from memory (if the kernel allows it). This means there’s no chance for any additional code to run, meaning there is no way to really deal with a “force kill” sent to your application.

    If you want to handle this, you have 2 options (that I can think of):

    1. Publish a disclaimer telling users to add your app to the “ignore” list of ATK.
    2. Find some way to maintain functionality without relying on the onDestroy() method.

    EDIT:

    If you want to check for your process from a list of currently-running processes, look into getRunningAppProcesses().

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

Sidebar

Related Questions

My Flex app runs a service to a php page that pulls data from
How can I check which platform my app runs, AWS EC2 instance, Azure Role
Is there a way to specify that the app runs on the iphone, the
i can't run my wp7 app(https://github.com/slodge/face) on my device. I mean, app runs, partially.
My web app runs well except one thing. File Uplods. Basically when a user
How do I create a Cocoa app that runs in the background (not in
Ok, the problem is that when my app runs on the simulator it seems
How can I identify if the iOS device my app runs on is an
I have a Winforms app which runs under a standard user account (i.e. user
I've been noticing that sometimes my Facebook app runs slow, and when checked it

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.