0

I'm using the examples from this site: http://android.konreu.com/developer-how-to/vibration-examples-for-android-phone-development/

So, as you see, I'm using the Vibrator Service. The problem, which also is written on the site, is that the vibration don't work if the screen has timed out.

Anyone has any ideas to fix this? It surely should work as the vibration works on phone calls, alarm etc. even though the screen is black. But maybe I have to wake up the phone before the vibration is called?

janlindso
  • 1,225
  • 3
  • 16
  • 41

1 Answers1

0

See this page about acquiring a wake lock. Hopefully it will do what you want.

Jack
  • 9,156
  • 4
  • 50
  • 75
  • Yes, I have actually read about wake lock already. So, I would have to wake the phone before it should vibrate? If I recall correctly, that's also what the alarm and caller does as well. Actually I'm running a chronometer to specify when it should vibrate. I tried to add code to wake the phone before the vibration. But it seems like it cannot wake the phone when it's already sleeping. – janlindso Aug 05 '11 at 21:10