notifications support vibration now

This commit is contained in:
Daniel Gultsch 2014-03-12 01:49:11 +01:00
parent 36728d5c0f
commit 33f8747b87
2 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE"/>
<application <application
android:allowBackup="true" android:allowBackup="true"

View File

@ -200,6 +200,9 @@ public class UIHelper {
if (unread.size() != 0) { if (unread.size() != 0) {
mBuilder.setSmallIcon(R.drawable.notification); mBuilder.setSmallIcon(R.drawable.notification);
if (notify) { if (notify) {
int dat = 110;
long[] pattern = {0,3*dat,dat,dat,dat,3*dat,dat,dat};
mBuilder.setVibrate(pattern);
mBuilder.setLights(0xffffffff, 2000, 4000); mBuilder.setLights(0xffffffff, 2000, 4000);
if (ringtone != null) { if (ringtone != null) {
mBuilder.setSound(Uri.parse(ringtone)); mBuilder.setSound(Uri.parse(ringtone));