-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[$500] User receiving "new message" notification sound even if the phone is on DND #36714
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01861dee3b63d29cfc |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws ( |
Triggered auto assignment to @muttmuure ( |
@shawnborton tagging you as per this comment |
cc @Julesssss in case you wanna take this one. |
ProposalPlease re-state the problem that we are trying to solve in this issue.User receiving "new message" notification sound even if the phone is on DND What is the root cause of that problem?Missing code for this functionality What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional) |
Proposal Please re-state the problem that we are trying to solve in this issue. Even if phone is on DND , user is receiving new message notification sound. What is the root cause of that problem? What changes do you think we should make in order to solve the problem?
To implement a function that checks whether the Do Not Disturb (DND) mode is active on a mobile device, we need to use platform-specific APIs provided by the operating system. For example in iOS: Here's how we can implement the isDNDActive function for iOS:
For Android: Here's how we can implement the isDNDActive function for Android:
What alternative solutions did you explore? (Optional) |
📣 @divyanshk443! 📣
|
Are we not confusing two things here? DND should block/silence native push notifications, but this sound is occurring from a message received by pusher websocket while the app is alive. It's not a push notification, but an in-app event. Perhaps we should not play the sound if the app is not in the foreground, but there's an argument that the sound should be played in this case:
If pusher triggered a push notification then i would agree with us needing to mute it. |
If we want to detect silent/dnd mode then we can use https://github.com/hirbod/react-native-volume-manager package (for example) However from my observation we get push notifications only if app is in background or it's killed. So maybe wrapping the function |
When I mute in Desktop, it doesn't change my settings on Web/Chrome, even after refresh. Is that related to this bug or should I report in #expensify-bugs ? |
@Julesssss I also experienced this, but there are two weird things going on here.
|
Hey @pecanoro, so on Android our message received sound is controlled by the media volume setting, which I think makes sense for the message SENT sound. For message received, this should only be coming from the push notification, which will follow the users DND preference. So removing the logic that plays message received sound on Android/iOS should resolve this. |
Do you know if we are planning to add the functionality to disable the sounds to the app? It feels pretty weird having to disable media sound in the whole phone just to mute an app. |
I agree, but this is pretty standard AFAIK. Users either disable the sounds, or turn down media volume with the volume hardware buttons. Also btw there's already a 'Mute all sounds from Expensify' option under preferences. |
@mallenexpensify I think you describe the same problem as in #36487 right? |
Yes, thanks @kirillzyusko , I wasn't sure if it was expected behaviour. Good to know it's working as expected |
idk if this has been mentioned yet, but the sound also stops music being played on my iphone (in addition to making the sound when on silent). Other apps have a pause in the music or lower the music to play over it, but this just overrides what I am listing to without resuming afterwwards |
Ah thanks @nikihatesgh, I added that to the tracking issue |
Works for me, I'll close this now. |
@Julesssss How is this expected behavior? If my phone is muted, it should not play any notification sounds when I am getting new messages 🤔 |
@pecanoro I should have made it clearer, but that was in response to @mallenexpensify's account-wide preference, not your issue. Your issue (which I 100% agree with) was due to a faulty implementation that has to be rewritten and is being handed separately here. We can keep this issue open, but there are lots of different issues being reported here and it's getting confusing. I wanted to close this issue to help clear up our list of tasks. |
I'll re-open as the PR is about to be merged anyway. But further comments should only be related to the iOS/Android sound cue playing. Please raise other issues on the parent issue tracker |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Question: does this solution cover notification preferences? E.g. notifications set to |
If your issue is just the sound playing, then yes I believe so. Right now we're removing the local sound and tying it to mobile push notifications. Once that is done we'll be looking at the room preference. |
Wait @dylanexpensify, perhaps this is the issue you are looking for? |
Ahh interesting, it looks like mine is similar, but technically earlier than that one linked! However, that one is further along and mine was reported by Applause, so I think we can close mine in favor of that one. |
@Julesssss, @Ollyws, @muttmuure Eep! 4 days overdue now. Issues have feelings too... |
@muttmuure @dylanexpensify would you mind retesting on the latest staging build, please? This is fixed for me on Android |
Just waiting on a review, not overdue |
@Julesssss @Ollyws @muttmuure this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
This should be fixed, though i'm unable to verify. My iPhone doesn't play loud notifications for ANY app. |
@Julesssss should we ask reporter to verify it again? |
Hi @m-natarajan, could you please retest on the latest builds? Thanks! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.42-1
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @quinthar
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1708049588944159
Action Performed:
Expected Result:
No sound notification
Actual Result:
Sound notification is heard
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: