Android设备默认振动模式

ira*_*vul 7 android vibration android-vibration

我尝试使用设备的默认振动设置振动我的应用程序,但我不能使用振动.我尝试了下面的代码.

 case AudioManager.RINGER_MODE_VIBRATE:
         Vibrator vibrator = (Vibrator) this.context.getSystemService(Context.VIBRATOR_SERVICE);
         long[] pattern = { 0, 1000, 2000, 3000, 2000 };
         vibrator.vibrate(pattern, 0);
Run Code Online (Sandbox Code Playgroud)

有没有办法用默认设置振动设备.我使用了模式,但我需要设备来电默认振动设置.

或者我怎样才能获得设备的振动模式?

谢谢.