权限:
<uses-permission android:name="android.permission.VIBRATE" />
代码:
Vibrator vibrator=(Vibrator)getActivity().getSystemService(Service.VIBRATOR_SERVICE); vibrator.vibrate(new long[]{0,200,200,200}, -1);
参数含义:静止时长,震动时长,静止时长,震动时长。。。
权限:
<uses-permission android:name="android.permission.VIBRATE" />
代码:
Vibrator vibrator=(Vibrator)getActivity().getSystemService(Service.VIBRATOR_SERVICE); vibrator.vibrate(new long[]{0,200,200,200}, -1);
参数含义:静止时长,震动时长,静止时长,震动时长。。。