Skip to content

Commit 339802d

Browse files
committed
removed vibration from android
1 parent 66e99b9 commit 339802d

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

src/android/Notification.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ Licensed to the Apache Software Foundation (ASF) under one
3232
import android.media.Ringtone;
3333
import android.media.RingtoneManager;
3434
import android.net.Uri;
35-
import android.os.Vibrator;
3635
import android.widget.EditText;
3736

3837
/**
@@ -62,9 +61,6 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo
6261
if (action.equals("beep")) {
6362
this.beep(args.getLong(0));
6463
}
65-
else if (action.equals("vibrate")) {
66-
this.vibrate(args.getLong(0));
67-
}
6864
else if (action.equals("alert")) {
6965
this.alert(args.getString(0), args.getString(1), args.getString(2), callbackContext);
7066
return true;
@@ -130,20 +126,6 @@ public void beep(long count) {
130126
}
131127
}
132128

133-
/**
134-
* Vibrates the device for the specified amount of time.
135-
*
136-
* @param time Time to vibrate in ms.
137-
*/
138-
public void vibrate(long time) {
139-
// Start the vibration, 0 defaults to half a second.
140-
if (time == 0) {
141-
time = 500;
142-
}
143-
Vibrator vibrator = (Vibrator) this.cordova.getActivity().getSystemService(Context.VIBRATOR_SERVICE);
144-
vibrator.vibrate(time);
145-
}
146-
147129
/**
148130
* Builds and shows a native Android alert with given Strings
149131
* @param message The message the alert should display

www/notification.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,6 @@ module.exports = {
9797
exec(resultCallback, null, "Notification", "prompt", [_message, _title, _buttonLabels, _defaultText]);
9898
},
9999

100-
/**
101-
* Causes the device to vibrate.
102-
*
103-
* @param {Integer} mills The number of milliseconds to vibrate for.
104-
*/
105-
vibrate: function(mills) {
106-
exec(null, null, "Notification", "vibrate", [mills]);
107-
},
108-
109100
/**
110101
* Causes the device to beep.
111102
* On Android, the default notification ringtone is played "count" times.

0 commit comments

Comments
 (0)