Vibration even when the screen has timed out

2019-08-27 04:35发布

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?

1条回答
仙女界的扛把子
2楼-- · 2019-08-27 04:38

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

查看更多
登录 后发表回答