摘要:
1,在AndroidManifest.xml中加入如下,取得权限: <uses-permission android:name="android.permission.VIBRATE" />2,private Vibrator vibrator;...... if (Float.parseFloat(pricevalues) < cost){ vibrator = (Vibrator) getSystemService(VIBRATOR_SERVICE); long[] pattern = {100,10,100,1000}; // OFF/ON/OFF/ 阅读全文