Notifications fail to cause phone to chime or vibrate

NEW
Unassigned

Status

()

P5
normal
3 years ago
3 months ago

People

(Reporter: edwong, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

User Story

As a developer implementing push notifications for mobile web browsers I would like to be able to specify when a notification should chime or vibrate the phone such that I can get the attention of my users when it is important.
(Reporter)

Description

3 years ago
On Fx Android
1. goto: https://people.mozilla.org/~mnoorenberghe/w3c_notifications.htm
or https://people.mozilla.org/~ewong2/push-notification-test/
2. trigger a web notification or push notification

actual:
no chime or vibrate upon receiving notification

expected:
phone should chime and vibrate. Chrome does this for push notifications (don't seem to support web notifications on android)
(Reporter)

Comment 1

3 years ago
This doesn't seem to be a regression, but with the increase use of push notification rolling out in nightly, we should consider supporting this.

Comment 2

3 years ago
Does the spec give websites the ability to choose a noise level, the way native app developers have the ability to do that?

This seems like it has the potential to be really obnoxious.

NI to Barbara to get this on her radar.
Flags: needinfo?(bbermes)

Comment 3

3 years ago
"When updating a notification, sites can specify whether the device should alert the user with sound or vibration, or remain silent."

http://blog.chromium.org/2016/03/chrome-50-beta-push-notification.html
What do we have to do in order to make this work, as Edwin mentioned Chrome on Android doesn't support it either? Does it for iOS? Trying to understand what piece of browser piece needs to support this?
Flags: needinfo?(bbermes) → needinfo?(edwong)
(Reporter)

Comment 5

3 years ago
:barbara - I meant Chrome DOES support vibration/chime for push notifications but for general web notifications (without push from 2-3yrs ago)they've dropped support altogether
Flags: needinfo?(edwong)
(Reporter)

Comment 6

3 years ago
bryan - we should be explicit about how we want to support this in Fx48, which will be our first android release with push notifications
Flags: needinfo?(bclark)
Just so we're clear on the state of push and (interrupting) notifications.

Chrome on Android supports this spec.
Chrome on iOS? (unclear)

I've added the user story to this bug.  We're requesting that Android support ringing or vibrating the device as specified by the push notification.  This change will keep us compatible with Chrome on Android and give developers the right level of control to make different types of push notifications relevant as needed.

We need to investigate iOS support, if Chrome doesn't yet support this on iOS it can be an advantage for us and if they already to then we'll need to add it to remain compatible across mobile operating systems.

@barbara, This is an important part of push support for mobile to remain compatible with modern mobile browsers. I'd like to get this in the backlog and see if Fx48 is possible.
User Story: (updated)
Flags: needinfo?(bclark) → needinfo?(bbermes)

Comment 9

2 years ago
(In reply to Barbara Bermes [:barbara] from comment #9)
> margaret, I assume this requires frontend UI work, is this something we
> could squeeze in after all the mobile focus updates?
> 
> If not, is another team able to work on this instead?
> 
> While I agree we should stay competitive, I wonder if this is really that
> urgent at this point, due to all the re-org?

This is a web API, so this is platform work. There is no UI.

Yes, you'll need to use Android APIs, but platform people can do that. jchen or someone on the DOM team should be able to implement this.
Flags: needinfo?(margaret.leibovic)

Updated

2 years ago
Flags: needinfo?(alam)
margaret, I assume this requires frontend UI work, is this something we could squeeze in after all the mobile focus updates?

If not, is another team able to work on this instead?

While I agree we should stay competitive, I wonder if this is really that urgent at this point, due to all the re-org?
Flags: needinfo?(margaret.leibovic)
Flags: needinfo?(bbermes)
Flags: needinfo?(alam)

Comment 11

2 years ago
Consider whether 1236902 is a dup of this (or vice versa)?

Comment 12

2 years ago
> I wonder if this is really that urgent at this point, due to all the re-org?

Without this, FF on Android is a non-starter for *any* real time messaging or apps w. state updates.
Chrome only supports the Notification API on Service Workers, which I've just added to my
own messaging so I can get full support on Android:

    https://github.com/vandys/-webXMPP

People are not going to be OK with turning on their phone every other minute.  Please, please
fix this.  Thanks.

Comment 13

2 years ago
I really need this. Right now notifications are almost useless.

Comment 14

2 years ago
This could be fixed quite simple in:
https://hg.mozilla.org/mozilla-central/file/tip/mobile/android/base/java/org/mozilla/gecko/notifications/NotificationClient.java#l149

Add the following [1]:

> .setDefaults(DEFAULT_ALL)

[1] https://developer.android.google.cn/reference/android/support/v4/app/NotificationCompat.Builder.html#setDefaults(int)


Additional notification options also could be supported easily, like re-notify, custom vibration patterns, etc.
Flags: needinfo?(bbermes)
Joe, this might be something we can put on the Trello board for Fennec....
Flags: needinfo?(bbermes) → needinfo?(jcheng)
Blocks: 1341545

Comment 18

a year ago
In an other bug the default sound for notifications has been enabled, but vibration is still missing. It would be great if you could add this too.

Comment 19

a year ago
Enabling sound was great, please set the bit for blinking the notification LED as well.
Otherwise if you miss the sound you won't know about messages waiting until you turn
on the screen.

Comment 20

7 months ago
IS this going to get fixed?
Flags: needinfo?(bbermes)

Comment 21

7 months ago
My "daily driver" is Android with Fennec, using long polling and HTML5 Notifications for email/SMS/XMPP/telemtry.
Your adding of sound for notifications was great; I can provide a user story if that can help you think about
vibration and LED as well.
Currently not scheduled, will updated once priorities change.
Flags: needinfo?(bbermes)
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195

Needinfo :susheel if you think this bug should be re-triaged.
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.