diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-06-29 10:48:29 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-06-29 10:48:29 +0200 |
commit | e20199d74c2a48eebab924a1de217b722ca7cf4d (patch) | |
tree | 0120cce4cf83209e6c1764f8170a86dc959c6fdc /src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | |
parent | bbc9ba78933cde7bd51508ba1ae4850504cdd637 (diff) |
vibrate on new messages when app is open
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services/XmppConnectionService.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 1d80c066f..df52a3b27 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -23,6 +23,7 @@ import android.os.IBinder; import android.os.PowerManager; import android.os.PowerManager.WakeLock; import android.os.SystemClock; +import android.os.Vibrator; import android.preference.PreferenceManager; import android.provider.ContactsContract; import android.security.KeyChain; @@ -2859,6 +2860,12 @@ public class XmppConnectionService extends Service { return count; } + public void vibrate() { + Log.d(Config.LOGTAG,"Notification: short vibrate"); + Vibrator vibrator = (Vibrator) getSystemService(VIBRATOR_SERVICE); + vibrator.vibrate(100); + } + public void showErrorToastInUi(int resId) { if (mOnShowErrorToast != null) { |