1首先在AndroidManifest.xml中添加震动权限
2代码中加入:
Vibrator vib = (Vibrator) this.getSystemService(Service.VIBRATOR_SERVICE); vib.vibrate(500);