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 6063277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:08:51+00:00 2026-05-23T09:08:51+00:00

I am currently making an app that will control and make use of the

  • 0

I am currently making an app that will control and make use of the light sensor. As such I need data for when the ambient lighting changes (via the light sensor in lux). How would I make it so that when the user exits my application that it stays running in the background with the ability to collect data and make changes to the system?

  • 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-23T09:08:51+00:00Added an answer on May 23, 2026 at 9:08 am

    If you do not un-register your sensors from your sensor manager on OnPause() your sensor event listener events should still be getting being fired at regular intervals. You should then be-able to do what ever functionality you need from there. However if the user stops the program and the system sees that its been inactive for a while and its system memory is running low there is a possibility that the android OS will kill the task thinking its not needed. I am sure there are some flags or something to be called to stop this from occurring but I cant tell you off the top of my head.

    You could also look into writing a background service if you want it to run all once the user boots-up.

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

Sidebar

Related Questions

I am currently designing an iOS 5 iPhone app that will use a .NET
I am currently making a rails app that will search #barcampmlk2 #{thesessionname} +1 from
I'm currently making a whimsical iPhone app that will allow you to change your
I am currently making an app that will have multiple timers, which are basically
I'm currently making an iPhone app that has PDF viewing a crucial part of
I'm using soci for making my app interact with databases and currently I use
I am currently making an app which works with images. I need to implement
I am currently making an app and website. Is there a system around that
I'm currently making an application that will read some post on my wall. Problem
I am making an app that simulates a keyboard. I will do it by

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.