title: Tracking screen time in android
body: <p>for a university project I have to track the screen time of an android smartphone. It's hard to find proper search results, because my search engines do only suggest apps, that already do this for you. I am interested in how these apps do this. I assume, there is a native API on android which supports you with this. Unfortunately, I can't find anything that already does this.</p>
  
  <p>The app is supposed to run a little service which tracks the time of the screen activity and other stuff (like location). It would be great, if someone of you can help me out on where to look for examples and where to find information about the android API.</p>
  
  <p><strong>Edit:</strong>
  <em>To be a bit more precise: It's about the overall screen time, not about the screen time a specific app has.</em></p>