<
uses-permission
android:name
=
"android.permission.VIBRATE"
/>
2. 獲取震動服務
@Override public onCreate(Bundle icicle) { ... Vibrator vibService = (Vibrator)getApplication().getSystemService(Service.VIBRATOR_SERVICE); .... }
3. 開始震動
vibService.vibrate(1000) //震動1秒