Код: Выделить всё
private final VibrationEffect vibrationEffect = createOneShot(1000, DEFAULT_AMPLITUDE);
if (SDK_INT >= 33) vibrator.vibrate(vibrationEffect, VibrationAttributes.createForUsage(VibrationAttributes.USAGE_RINGTONE));
else vibrator.vibrate(vibrationEffect, new AudioAttributes.Builder().setUsage(USAGE_NOTIFICATION_RINGTONE).build());
< /code>
< /blockquote>
\
\
\
\
\
\
Подробнее здесь: https://stackoverflow.com/questions/794 ... st-android
Мобильная версия