1. Are you ready for the Galaxy S20? Here is everything we know so far!

Screen Brightness Listener

Discussion in 'Android Development' started by Omar Alharbi, Feb 26, 2019.

  1. Omar Alharbi

    Omar Alharbi Lurker
    Thread Starter

    I'm in the middle of developing an application that requires listening to the screen brightness continuously. I have tried comparing values...etc but nothing seems to be efficient. Is there something I'm missing out? like a listener or some form of such.
     

    Advertisement

  2. Deleted User

    Deleted User Guest

    I don't think there are any services that provide a screen brightness listener/callback.

    In the absence of such a service, the best you can do is start a long running background thread that continuously sleeps, and periodically checks the brightness setting.
     
  3. Omar Alharbi

    Omar Alharbi Lurker
    Thread Starter

    The reason behind the desperate search for a screen listener is that I need to synchronize two different application without overwhelming the system. Would be able to advice on that ?
     
  4. Deleted User

    Deleted User Guest

    What do you mean by 'synchronize two different applications'?
     
  5. Omar Alharbi

    Omar Alharbi Lurker
    Thread Starter

    I mean Having the two applications to work concurrently with each other.
     
Loading...

Share This Page

Loading...