On Nov 4, 3:03 am, gudujarlson <[email protected]> wrote: > > Monitor the ACTION_SCREEN_OFF and ACTION_SCREEN_ON Intents, then. If > > your application starts based on a user action, then you know the screen > > is on at that point -- you don't need an API for that. > > That occured to me, but I'm not confident that it would be reliable. I > don't like the idea of listening for 2 events, storing a status for > later use, and hoping that I never miss an event or start with the > screen off. One possible troublesome scenario occurs when the app > starts really slow for some reason and before the listener is > registered, the user turns the screen off.
I also have this problem and there doesn't seem to be a way around it. And no, I'm not 'doing it wrong'. Polling really would be best in my case - my app reacts to received SMS's and needs to do different things depending on whether the screen is on or not. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

