-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitignore
36 lines (30 loc) · 1005 Bytes
/
.gitignore
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.DS_Store
.atom/
.dart_tool/
.idea
.vscode/
.packages
.pub/
build/
ios/.generated/
packages
.flutter-plugins
new MethodChannel(getFlutterView(), CHANNEL).setMethodCallHandler(
new MethodCallHandler() {
@Override
public void onMethodCall(MethodCall methodCall, Result result) {
if (methodCall.method.equals("vibrateDevice")) {
String message = "Vibrating Device";
Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
vibrator.vibrate(VibrationEffect.createOneShot(2500,VibrationEffect.DEFAULT_AMPLITUDE));
}
}else{
vibrator.vibrate(2500);
}
result.success(message);
}
}
}
);