Timestamp for screen on/off and other app use

Hello,

I would like to use LAMP in as part of a study of participants’ naturalistic sleep patterns. I am interested in knowing the time stamps for when the screen was on or off, for the purpose of verifying whether the participant was actively using their phone at a certain time of day or night. (Wearable activity and sleep trackers have difficulty discerning lying in bed to sleep versus lying in bed while scrolling social media feeds on the phone, so if we know that a participant was actively using their phone at 3am, we can infer that they were not asleep). Is this possible? My question is not about total screen time per day, but rather, at a specific time of day, was the screen on or off?

I have seen another post, “Recording time spent on other apps,” which is related but does not exactly answer this question.

Many thanks.

Hi @ChristinaChick,

Thanks for your interest in mindLAMP and your insightful question. LAMP captures changes in screen state using the lamp.screen_state sensor - you can find some documentation on it at Data Types | LAMP Platform .

Each screen_state event contains a UNIX timestamp. While LAMP won’t automatically calculate whether the screen was on or off by itself for a given moment in time, that can inferred from the timestamp. The easiest way to do this would probably be through Python using the official LAMP-core module – more info about this can be found at Preparing to Analyze Your Data in Python | LAMP Platform .

I hope this helps - please let me know if I can give you any more info or sample code.

Best,
Luke