Vibration even when the screen has timed out

蓝咒 提交于 2019-12-12 04:30:45

问题


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:


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



来源:https://stackoverflow.com/questions/6960877/vibration-even-when-the-screen-has-timed-out

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!