We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86928ec commit ad01b44Copy full SHA for ad01b44
packages/haptics/index.android.ts
@@ -1,6 +1,6 @@
1
export * from './common';
2
3
-import { Utils } from '@nativescript/core';
+import { Utils, Device } from '@nativescript/core';
4
import { HapticImpactType, HapticNotificationType } from './common';
5
6
export class Haptics {
@@ -52,7 +52,7 @@ function trigger(
52
53
if (!vibrator) return;
54
55
- if (vibrator.hasVibrator()) {
+ if (parseFloat(Device.sdkVersion) >= 29 && vibrator.hasVibrator()) {
56
switch (type) {
57
case 'notification':
58
vibrator.vibrate(android.os.VibrationEffect.createPredefined(android.os.VibrationEffect.EFFECT_TICK));
0 commit comments