title: Android Vibration while locked/sleep
body: <p>Whether the user has the screen on or off I want to notify the user by a vibration. If the screen is on, this works well:</p>
  
  <pre><code>Vibrator vibrator = (Vibrator) getApplicationContext().getSystemService(Context.VIBRATOR_SERVICE);
                              long sleep = 100;
                              long vibrate = 500;
                              long[] vibratePattern = {0, vibrate, sleep, vibrate, sleep};
                              vibrator.vibrate(vibratePattern, -1); 
  </code></pre>
  
  <p>Its called by a Thread that is implemented in a Service.</p>
  
  <p>The Thread runs always even if the screen is off. I checked that because im implementing a timer. So that cant be the problem!</p>