Fixed Notifications. I messed up when I changed the code. Mastodon Boop now sounds again, and vibration works for silent notifications.
This commit is contained in:
parent
fc0a6727c3
commit
39c9c4c188
|
@ -596,11 +596,8 @@ public class Helper {
|
|||
.setAutoCancel(true)
|
||||
.setContentIntent(pIntent)
|
||||
.setContentText(message);
|
||||
|
||||
int notifDefaults = FLAG_SHOW_LIGHTS;
|
||||
notificationBuilder.setDefaults(notifDefaults);
|
||||
if( sharedpreferences.getBoolean(Helper.SET_NOTIF_SILENT,false) ) {
|
||||
notificationBuilder.setDefaults(notifDefaults|DEFAULT_VIBRATE);
|
||||
notificationBuilder.setVibrate(new long[] { 500, 500, 500});
|
||||
}else {
|
||||
String soundUri = ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + context.getPackageName() +"/";
|
||||
notificationBuilder.setSound(Uri.parse(soundUri + R.raw.boop));
|
||||
|
|
Loading…
Reference in New Issue