[MOD][XPOSED]Whatsapp Quiet Hours

Search This thread

pbosio

Senior Member
Mar 29, 2013
116
102
Buenos Aires
Introduction


This Module adds the following features to WhatsApp:
+Mute All (mutes all whatsapp's notifications for a period of time)
+Custom Quiet Hours (set quiet hours to whatsapp)
+Whitelist feature: Avoid certain contacts' notifications to be mute (Experimental stage for KK devices)

Notes:
Devices running LP: This module is no longer necessary any more if you only used it to fix not being able to mute WhatsApp's sounds with your Quiet Hours app or CM Quiet Hours feature. WhatsApp is now playing it notification's sounds with the proper API.

Whitelist: Whitelist will make a copy of your whatsapp's contact list into your sdcard (sdcard/.whatsappquiethours/contacts.json) so if you are worry about that, then, do not enable it... (there is an option in preferences screen to delete this file if you just want to try it once)

Permissions: READ/WRITE_EXTERNAL_STORAGE are needed for Whitelist (check whitelist's note)



Requirements:
Xposed Framework
minSdkVersion 14 (Android 4.0+)

1.5
Changelog:
*better way used for checking if sender is whitelisted
*for LP+ devices: added option to choose which method use to implement
whitlist (force led/vibration and use music's stream for sound or set
the notification category as an alarm to bypass Android's interruption
system/zen mode)
*enabled whitelist for devices all compatible devices (needs testing on KK devices)

Changelogs

1.4.8
Changelog:
*changed Mute All to show slider instead of checkboxs to choose mute
time
*new permissions: READ/WRITE_EXTERNAL_STORAGE
*modified mod's settings actionbar to look more like whatsapp's actionbar
+added Whitelist feature for LP devices (needs testing)
ONLY for WhatsApp version 2.12.194 or above

1.4.7
Changelog:
+reverted some code to fix module on KK devices

1.4.6
Changelog:
+fixes for WhatsApp version 2.12.115
install only if you are in this version or above
Known issues:
-Not working on KK.

1.4.5
Changelog:
+running on lollipop 5.1

Known issues:
-Not working on KK.

1.4.4
Changelog:
DO NOT UPDATE TO THIS VERSION IF YOUR ARE NOT IN WHATSAPP VERSION WITH MATERIAL DESIGN

Known issues:
-no known issue so far, please report.


1.4.3
Changelog:
*support new WhatsApp UI (Callings)
*quickfix for callings (calling ringer not being played untill "call
missed" notification) "Contact ringtone" under "Calls" in WhatsApp
settings must be unchecked for this to work



1.4.2
Changelog:
+added german translation (thanks @warci)
*fixed bug where module was crashing in some devices while trying to get the NotificationManager's instance



1.4.1
Changelog:
*Fixed: On Custom quiet hours and/or on "Mute all" state voice messages are not played.
*Fixed: Issue with new version of WhatsApp where the "send message" sound is played as a notification



1.4
Changelog:
+added: "Mute all" feature, it works like WhatsApp's mute group feature but for all notifications, Contacts, Groups, Broadcasts, etc.
*fixed: quiet hours doesn't work if you have set in whatsapp settings to use contact ringtone
*fixed: all notifications will sound with the "notification tone" set on whatsapp, even group or broadcast notifications
*fixed: notification sound is played for muted groups
*fixed: other notification issues
*fixed: voice messages not playing

Known issues:
*On Custom quiet hours and/or on "Mute all" state voice messages are not played]


1.3
Changelog:
*fixed annoying bug where clicking on a notification sometimes it didn't open whatsapp
*fixed possibility of losing some notifications

Known issues:
*quiet hours doesn't work if you have set in whatsapp settings to use contact ringtone
*all notifications will sound with the "notification tone" set on whatsapp, even group or broadcast notifications
*notification sound is played for muted groups

Note:
It won't work if you have set in whatsapp settings to use contact ringtone

1.2
Changelog:
*now fully supporting CM's built-in quiet hours
*now supporting other quiet hours apps or Xposed Modules that mute notifications
+added Spanish translation
*changed settings layout to look more like Whatsapp theme
*increased min api level, now is 14 (Android 4.0+)

Known issues:
*If you reboot your device while having a Whatsapp notification in your notification bar, that notification won't appear again in your notification bar after rebooting.
*Notifications for muted groups doesn't appear in notifications bar.
*Sometimes pressing on a notification don't take you to whatsapp.

Note:
Beware: It is possible that you lose some of Whatsapp notifications, it shouldn't happen, it never happened to me, but the possibility exist. If you encounter this issue, please report

1.1
Changelog:
*Fixed bug: Pressing the "new chat" button in WhatsApp opens WhatsApp Quiet Hours settings.

Known issues:
???

1.0
Known issues:
*Pressing the "new chat" button in WhatsApp opens WhatsApp Quiet Hours settings.

Source Code:
https://github.com/pbosio/WhatsappQuietHours

Download:
http://repo.xposed.info/module/ar.pbosio.whatsappquiethours

Screenshots:

attachment.php
attachment.php
attachment.php
 

Attachments

  • Screenshot_2014-04-19-19-21-56.png
    Screenshot_2014-04-19-19-21-56.png
    82.3 KB · Views: 23,570
  • Screenshot_2014-04-19-19-22-08.png
    Screenshot_2014-04-19-19-22-08.png
    78 KB · Views: 23,587
  • Screenshot_2014-04-19-19-23-59.png
    Screenshot_2014-04-19-19-23-59.png
    72.1 KB · Views: 23,423
  • 1.png
    1.png
    83.7 KB · Views: 22,594
  • 2.png
    2.png
    66.3 KB · Views: 22,368
  • 3.png
    3.png
    56.3 KB · Views: 22,348
Last edited:

Jrhoop

Senior Member
Dec 1, 2010
678
295
UK
Samsung Galaxy S22 Plus
Quick feedback - Had to install twice for some funny reason. Xposed must have been having a funny turn. Intergrates well with whatsapp+ and Danvdh 4.4.2 rom.
Now just to wait for somebody to whatsapp me at 1am :D
 

shadeMe

Senior Member
Feb 10, 2013
222
36
Spiffy app, kudos :good:

If you're taking requests, I'd dearly love for an option to disable notifications from group chats (outside quite hours). I use a MotoX-ish active display app and it's a nuisance to see my phone wake up every time someone posts a cat pic.
 

pbosio

Senior Member
Mar 29, 2013
116
102
Buenos Aires
Quick feedback - Had to install twice for some funny reason. Xposed must have been having a funny turn.

That is really strange, I can't imagine why that can be happening

Does it support GravityBox's implementation of QuietHour?

Sent from my Nexus 5

No it doesn't, GravityBox's QuietHours aren't working for whatsapp?
If you can confirm me that, then I will give it a try, I imagine it shouldn't be too difficult to add support for GravityBox's QuietHours.
 

hamzahrmalik

Senior Member
May 31, 2013
1,658
2,020
Introduction

This module use CyanogenMods Quiet Hours settings to enforce quiet hours to Whatsapp.
If you are on another ROM, don't worry, you can set a custom time range for quiet hours.
If you ar on CM and you want to use a custom time range for whatsapp, you can do that too.


Requirements:
Xposed Framework

Screenshots:

attachment.php
attachment.php
attachment.php


Source Code:
https://github.com/pbosio/WhatsappQuietHours

Download:
http://repo.xposed.info/module/ar.pbosio.whatsappquiethours

Can we just have it to go quiet for some time, rather than a fixed time every day? Like the built in function for group chats?
 

momomok

Senior Member
Dec 6, 2010
1,346
408
Hong Kong
No it doesn't, GravityBox's QuietHours aren't working for whatsapp?
If you can confirm me that, then I will give it a try, I imagine it shouldn't be too difficult to add support for GravityBox's QuietHours.

Just tested, no, GB's QH has no effect on whatsapp
(whatsapp not using std way to play notification sound as I read somewhere online)
 

pbosio

Senior Member
Mar 29, 2013
116
102
Buenos Aires
Pressing the "new chat" button in WhatsApp opens WhatsApp Quiet Hours settings. Anybody else?

Wow... that is an important bug, I will release a new build just to fix that some time this week

Can we just have it to go quiet for some time, rather than a fixed time every day? Like the built in function for group chats?

Ok, I imagine I can add that feature, but it has to be after 1 May

Just tested, no, GB's QH has no effect on whatsapp
(whatsapp not using std way to play notification sound as I read somewhere online)

I think I figure out a way to add compatibility with every QH system out there, but I will have to change many of the module logic.
It will probably be added after 1 May because I have a very complicated couple of week ahead.
 

kalel29

Senior Member
Dec 2, 2010
1,148
504
42
I've just uploaded a new build that fix that bug. Now "New Chat" button should behave as usual

NICE ,will test it asap,btw,can you maybe,if could be possible,put a quiet hour for individual persons? cause ,i wanna have notifications from my family,and job,because an emergency ,but not from others why im sleeping.

Thanks.
 

pbosio

Senior Member
Mar 29, 2013
116
102
Buenos Aires
NICE ,will test it asap,btw,can you maybe,if could be possible,put a quiet hour for individual persons? cause ,i wanna have notifications from my family,and job,because an emergency ,but not from others why im sleeping.

Thanks.

That's a good idea, kind of contacts exceptions for quiet hours... but I don't think is going to be possible, but I'll see what I can do
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    Introduction


    This Module adds the following features to WhatsApp:
    +Mute All (mutes all whatsapp's notifications for a period of time)
    +Custom Quiet Hours (set quiet hours to whatsapp)
    +Whitelist feature: Avoid certain contacts' notifications to be mute (Experimental stage for KK devices)

    Notes:
    Devices running LP: This module is no longer necessary any more if you only used it to fix not being able to mute WhatsApp's sounds with your Quiet Hours app or CM Quiet Hours feature. WhatsApp is now playing it notification's sounds with the proper API.

    Whitelist: Whitelist will make a copy of your whatsapp's contact list into your sdcard (sdcard/.whatsappquiethours/contacts.json) so if you are worry about that, then, do not enable it... (there is an option in preferences screen to delete this file if you just want to try it once)

    Permissions: READ/WRITE_EXTERNAL_STORAGE are needed for Whitelist (check whitelist's note)



    Requirements:
    Xposed Framework
    minSdkVersion 14 (Android 4.0+)

    1.5
    Changelog:
    *better way used for checking if sender is whitelisted
    *for LP+ devices: added option to choose which method use to implement
    whitlist (force led/vibration and use music's stream for sound or set
    the notification category as an alarm to bypass Android's interruption
    system/zen mode)
    *enabled whitelist for devices all compatible devices (needs testing on KK devices)

    Changelogs

    1.4.8
    Changelog:
    *changed Mute All to show slider instead of checkboxs to choose mute
    time
    *new permissions: READ/WRITE_EXTERNAL_STORAGE
    *modified mod's settings actionbar to look more like whatsapp's actionbar
    +added Whitelist feature for LP devices (needs testing)
    ONLY for WhatsApp version 2.12.194 or above

    1.4.7
    Changelog:
    +reverted some code to fix module on KK devices

    1.4.6
    Changelog:
    +fixes for WhatsApp version 2.12.115
    install only if you are in this version or above
    Known issues:
    -Not working on KK.

    1.4.5
    Changelog:
    +running on lollipop 5.1

    Known issues:
    -Not working on KK.

    1.4.4
    Changelog:
    DO NOT UPDATE TO THIS VERSION IF YOUR ARE NOT IN WHATSAPP VERSION WITH MATERIAL DESIGN

    Known issues:
    -no known issue so far, please report.


    1.4.3
    Changelog:
    *support new WhatsApp UI (Callings)
    *quickfix for callings (calling ringer not being played untill "call
    missed" notification) "Contact ringtone" under "Calls" in WhatsApp
    settings must be unchecked for this to work



    1.4.2
    Changelog:
    +added german translation (thanks @warci)
    *fixed bug where module was crashing in some devices while trying to get the NotificationManager's instance



    1.4.1
    Changelog:
    *Fixed: On Custom quiet hours and/or on "Mute all" state voice messages are not played.
    *Fixed: Issue with new version of WhatsApp where the "send message" sound is played as a notification



    1.4
    Changelog:
    +added: "Mute all" feature, it works like WhatsApp's mute group feature but for all notifications, Contacts, Groups, Broadcasts, etc.
    *fixed: quiet hours doesn't work if you have set in whatsapp settings to use contact ringtone
    *fixed: all notifications will sound with the "notification tone" set on whatsapp, even group or broadcast notifications
    *fixed: notification sound is played for muted groups
    *fixed: other notification issues
    *fixed: voice messages not playing

    Known issues:
    *On Custom quiet hours and/or on "Mute all" state voice messages are not played]


    1.3
    Changelog:
    *fixed annoying bug where clicking on a notification sometimes it didn't open whatsapp
    *fixed possibility of losing some notifications

    Known issues:
    *quiet hours doesn't work if you have set in whatsapp settings to use contact ringtone
    *all notifications will sound with the "notification tone" set on whatsapp, even group or broadcast notifications
    *notification sound is played for muted groups

    Note:
    It won't work if you have set in whatsapp settings to use contact ringtone

    1.2
    Changelog:
    *now fully supporting CM's built-in quiet hours
    *now supporting other quiet hours apps or Xposed Modules that mute notifications
    +added Spanish translation
    *changed settings layout to look more like Whatsapp theme
    *increased min api level, now is 14 (Android 4.0+)

    Known issues:
    *If you reboot your device while having a Whatsapp notification in your notification bar, that notification won't appear again in your notification bar after rebooting.
    *Notifications for muted groups doesn't appear in notifications bar.
    *Sometimes pressing on a notification don't take you to whatsapp.

    Note:
    Beware: It is possible that you lose some of Whatsapp notifications, it shouldn't happen, it never happened to me, but the possibility exist. If you encounter this issue, please report

    1.1
    Changelog:
    *Fixed bug: Pressing the "new chat" button in WhatsApp opens WhatsApp Quiet Hours settings.

    Known issues:
    ???

    1.0
    Known issues:
    *Pressing the "new chat" button in WhatsApp opens WhatsApp Quiet Hours settings.

    Source Code:
    https://github.com/pbosio/WhatsappQuietHours

    Download:
    http://repo.xposed.info/module/ar.pbosio.whatsappquiethours

    Screenshots:

    attachment.php
    attachment.php
    attachment.php
    4
    Thanks for the input, but sorry, it was not my intent to annoy or not be polite, maybe my poor english...

    No problem, I understand, my english isn't very good either, so, no problem...

    Ok, guys @nicesoni_ash @tovivekmishra @tobbbie I just finished doing some changes on the module.
    Options in the menu (Quiet Hours settings and Mute All) should be restored now (In the new WhatsApp UI)
    Call Ringer should work fine now, the only catch is that it will not work if you set to use contact ringtone, so, WhatsApp Settings -> Notifications -> Calls/Contact ringtone should be unchecked for this to work.

    I won't upload this build to the repo until next week because it needs at least a week of use to check there are no problems, but I attached the build to this post, so you can install it and test it.
    Let me know if something is not working.
    Cheers.
    4
    Just a small point of clarification here: this module only mutes Whatsapp itself, and not any other apps, right?

    So if I enable the Whatsapp Quiet Hours, and check "Mute notifications" and "Disable vibrations", that only affects the notifications and vibrations created by Whatsapp, and not other apps? (I assume this is the case, and it's what I hope!)

    Yes, It only works for WhatsApp, It doesn't mute notifications from other apps

    And another question: I assume this module doesn't affect the CM "Profiles" feature at all, right? It only sets Quiet Hours, but doesn't fix the problem with Profiles not working with Whatsapp?

    Currently Whatsapp is also not affected by any Profile settings which should mute Whatsapp (due to the same problem - Whatsapp doesn't use the correct API, or whatever it is).

    That means, if I use the Profile settings to create a new App Group for Whatsapp, and then I use one of my profiles (eg. "Night Profile") to disable the notification mode and ring mode for that App Group, it doesn't work - Whatsapp still makes a sound when a message arrives.

    Is there any way that this Xposed module could fix this too, or would that be beyond the scope of this module?

    I'm currently working in changing the module's logic to make it compatible with all Quiet Hours systems, CM's built in QH, GravityBox's QH, etc
    This will, probably, fix the issue with CM's profiles



    This is really ingenious! I have always been troubled over quiet hours not extending to whatsapp. Now I feel my phone is perfect, not going to affect my sleep anymore.

    Just to check as well, does enforcing of quiet hours mode (out of the designated quiet hours) also work on whatsapp?

    Currently, enforcing quiet hours mode does not work, in fact, disabling CM's quiet hours does not disable quiet hours of this module. That's a bug that will be fixed on next
    update.
    You can expect full CM's quiet hours compatibility on next update.


    thanks for replying,its nice to have a developer who likes feedback,and cares about his users.

    I think there are a lot of developers put there who welcome feedback, I think the issue usually is the nature of the feedback.
    For example, I'm a game developer, last year we published on several mobile stores a game for a movie about soccer, we had comments in the store like "I like it, but I would like it better if it the game were more similar to fifa" the game mechanic was pressing on a team mate to pass him the ball and dodging different obstacle, It had nothing to do with fifa! another was something like "I'll rate you only three stars because the PC game doesn't work" we didn't even developed the PC game, it was other studio that developed it.
    And sometimes I think developers don't have the time to answer 20 millions of users sending feedback, I have it easy, there are only 3 or 4 guys asking or sending feedback about this module.

    BTW, I think by now is pretty obvious that English is not my native language, if anybody find an error in the module text, please, let me know.
    3
    Well guys, I finally got some free time from work (sadly it's just for a couple of days #sadface) so I spent a couple of hours today working in some improvements and I need testers before pushing the update to xposed repo.
    Github repository is already up to date if you want to check the changes for yourselves.
    Main changes are:
    + I enable whitelist system for all devices. I need tester on KK to make sure everything is working
    + I changed the way to detect the sender of the msg (the old way had greater chances for error and it was only compatible for sdk > 5.0)
    + For LP users I added the option to select from two different methods the way whitelist is implemented. If you use Android zen mode/interruption system you should use the method created for that because is less buggy... If you use a third party quiet hours system then you should choose the option to play the notification in music stream so it is not blocked.

    Cheers
    3
    Hi, with the last updated the notification sound is disabled any time. I have set from 01 to 08 in the morning. But now we have 21.35 hour and no sound notification is coming. Only if I disable quit hour in check box.

    I9100 Tapatalk 4, C-Rom 4.4. 2
    Please, try the update I've just release, it should be working fine now.

    Does this mod unmute muted groups during not-quiet hours?
    It was written under "Known Issues" of that version, it was a bug, it is fixed in the update I've just release.