2011-09-28 52 views
0

AndroidAndroid振动器取消方法不起作用?

我有一个启动virbration的方法。

v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); 
     long[] pattern = { 0, 200, 500 }; 
     v.vibrate(pattern, 0); 

然后我想要一个方法,将停止该viabration。

v.cancel(); 

但它似乎没有工作,任何帮助将不胜感激。

+1

http://android.konreu.com/developer-how-to/vibration-examples-for-android-电话开发/请参考 – Abhi

+1

谢谢,检查出来,它的工作,似乎振动的开始和停止应该发生在同一个方法。 – Sims

回答