vibrate phone with pattern
refer to KeepItSilent.apk
private static void vibratePhone(Context context) {
long[] pattern = {0, 100, 1000, 300, 200, 100, 500, 200, 100};
Vibrator v = (Vibrator) context.getSystemService(VIBRATOR_SERVICE);
assert v != null;
v.vibrate(VibrationEffect.createWaveform(pattern, -1));
}
'android source ' 카테고리의 다른 글
hander message pass (0) | 2019.07.28 |
---|---|
sleep (0) | 2019.07.28 |
deleteOldLogFiles() (0) | 2019.07.23 |
view에 box 두르기 (0) | 2019.07.23 |
readyPackageFolder(), 특정 폴더 만들기 (0) | 2019.07.23 |