转载文章请注明出处:http://blog.csdn.net/dangxw_/article/details/17957175
android 控制手机震动的类为Vibrator 他所提供的方法只有四个
想要控制手机的震动强度,无疑就只能使用vibrate(long[] parttern,int repeat)方法了,查看这个方法的详解:
Vibrate with a given pattern.
Pass in an array of ints that are the durations for which to turn on or off the vibrator in milliseconds. The first value indicates the number of milliseconds to wait before turning the vibrator on. The next value indicates the number of milliseconds for which to keep the vibrator on before turning it off. Subsequent values alternate between durations in milliseconds to turn the vibrator off or to turn the vibrator on.
To cause the pattern to repeat, pass the index into the pattern array at which to start the repeat, or -1 to di