转自:http://hi.baidu.com/spare_h/blog/item/8253fd22780ae84b9a22ed74.html
Vibrator--android 振动器
在manifest.xml中加入震动权限。
private Vibrator mVibrator;
mVibrator = (Vibrator) getSystemService(VIBRATOR_SERVICE);
mVibrator.vibrate(40);
<uses-permission Android:name="android.permission.VIBRATE"/>
本文介绍了如何在Android应用中使用振动器(Vibrator)组件。首先需要在manifest文件中添加震动权限,然后通过getSystemService获取Vibrator实例并调用vibrate方法实现设备震动。
1111

被折叠的 条评论
为什么被折叠?



