甚至当屏幕超时振动 [英] Vibration even when the screen has timed out

查看:149
本文介绍了甚至当屏幕超时振动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用本网站的例子:的http://android.konreu.com/developer-how-to/vibration-examples-for-android-phone-development/

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?

推荐答案

请参阅的有关收购唤醒锁定此页面。希望它会做你想做的。

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

这篇关于甚至当屏幕超时振动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆