title: Android - Acceleration sensor stops when APP goes to sleep
body: <p>I have the following problem: I want to get acceleration data, even when my phone is in sleep mode, and trigger an event when a threshold is reached.</p>
  <p>In the onPause-method I acquire a partial wakelock.
  For testing purposes I run a countdown timer in the background to check wether the App is still doing work.
  However approx after 1 minute screen off the sensor stops getting data, but the countdown timer still runs.</p>
  <p>Do you know why the sensor activity is killed althoug I have acquired a wakelock and the CPU seems to be running?
  Do I have to run the sensor in a service?</p>
  <p>I am using Android Version 12.
  This does not happen with older Android versions (e.g. Android 8).</p>