Closed Bug 1476720 Opened 3 years ago Closed 11 months ago

Persistent notification for "Mozilla Location Service running", which does nothing when I tap it

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(firefox63 verified)

RESOLVED INCOMPLETE
Firefox 63
Tracking Status
firefox63 --- verified

People

(Reporter: dholbert, Assigned: vlad.baicu)

References

Details

(Whiteboard: [priority:high])

Attachments

(5 files)

Starting a day or so ago, Nightly gives me a persistent non-dismissable Android notification (in my phone's notification tray) which says...
> Firefox Nightly
> Mozilla Location Service running

If I tap the notification, nothing happens.

In contrast, for other apps that put persistent notifications there (WhatsApp Web, Android Messages Web, FitBit, Weather Underground), I can tap the notification to go to the app or to a configuration pane in the app that's related to the persistent service associated with the notification.

EXPECTED RESULTS: I should be able to tap this notification to find out more and/or to configure Mozilla Location Service (maybe jump directly to the nightly "Privacy" preferences screen where this service has a checkbox).

My device is a Pixel 2 running Android 9 "P" beta (which I've been running for several months).  I just noticed the Mozilla Location Service notification yesterday, so I'm guessing it's associated with bug Bug 1450450 which has had pieces landing over the past few days. (Possibly bug 1474961 in particular.)
Looks like this Andreas had the same idea RE "expected results" here in bug 1474961 comment 10:
> Opening the relevant section in the Settings when the notification is tapped
> would be a good thing to implement.

So I guess we can consider this bug a followup to bug 1474961, covering that ^^ request.
Summary: Persistent notification for "Mozilla Location Service running", which does nothing when I tap it (and cannot be dismissed) → Persistent notification for "Mozilla Location Service running", which does nothing when I tap it
Assignee: nobody → vlad.baicu
Blocks: android-o
Attachment #8993330 - Flags: review?(sdaswani) → review?(nchen)
I experience the same issue here, which is a bit surprising given I do not have the "Mozilla Location Service" setting enabled (in the Settings > Privacy page).
(In reply to Mike Taylor [:miketaylr] (62 Regression Engineering Owner)(PTO July 20, 23) from comment #4)
> I experience the same issue here, which is a bit surprising given I do not
> have the "Mozilla Location Service" setting enabled (in the Settings >
> Privacy page).

I think the notification-despite-setting-being-disabled is bug 1476596. (which had a patch land ~10 hours ago)
Comment on attachment 8993330 [details]
Bug 1476720 - Set MLS notification action.

https://reviewboard.mozilla.org/r/258112/#review265240
Attachment #8993330 - Flags: review?(nchen) → review+
Hello,

I also believe this notification should be in its own notification channel. That way we can dismiss it without having to dismiss all notifications from Firefox.
I agree, however I'm not sure about the importance of the notification, I'm guessing it should be either minimum or low.

>    /**
>     * Min notification importance: only shows in the shade, below the fold.
>     */
>    public static final int IMPORTANCE_MIN = 1;
>    /**
>     * Low notification importance: shows everywhere, but is not intrusive.
>     */
>    public static final int IMPORTANCE_LOW = 2;

NI-ing Andreas for his opinion on this
Flags: needinfo?(abovens)
"Min notification importance" seems right for this.
Flags: needinfo?(abovens)
Attachment #8993330 - Flags: review?(sdaswani)
Whiteboard: [priority:high]
Attachment #8995207 - Flags: review?(sdaswani) → review?(nchen)
Comment on attachment 8995207 [details]
Bug 1476720 - Set MLS notification action.

https://reviewboard.mozilla.org/r/259694/#review266776

Are we going to have a low-importance channel for media control as well? Right now the media notification is pretty intrusive every time I play a video.
Attachment #8995207 - Flags: review?(nchen) → review+
Yes, that issue is being tracked here https://bugzilla.mozilla.org/show_bug.cgi?id=1477700 and that patch will be updated as soon as this one lands
Keywords: checkin-needed
Pushed by ccoroiu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6a7d106f5120
Set MLS notification action. r=jchen
https://hg.mozilla.org/integration/autoland/rev/834680a1a447
Set MLS notification action. r=jchen
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6a7d106f5120
https://hg.mozilla.org/mozilla-central/rev/834680a1a447
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Flags: qe-verify+
The notification is not appearing now on top of the app and tapping it opens the Privacy settings menu.
Fixed on Nightly 63.
Devices:
Google Pixel (Android P Beta)
HTC 10 (Android 8.0)
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Sorry for abusing the bugzilla ticket for asking a question, but it's related to the issue. Is there a way to disable this permanent notification without disabling the stumbler? I don't want to disable it but it's so annoying for me to have this useless icon in the status bar - and it's not going away after closing Firefox! - that I have to disable the stumbler if it's not possible to hide this notification. I don't want to restart my smartphone after every use of Firefox. :(
I hate to re-open this in case that's not the right thing to do, but with the release of 63.0.2 yesterday, now with "Mozilla Location Service" enabled in settings, the "Mozilla Location Service running" notification is persistently present in the notification bar (and can not be cleared). Comment 16 seems to indicate that the notification should not be appearing.

Is this some kind of requirement driven by android that this be displayed to the user? Should it be possible to both help Mozilla by sharing location data and not have a persistent notification in the notification bar? I ask because though I want to provide location data to Mozilla, it's not worth having a Firefox icon taking up space in my status bar at all times and the notification area having a persistent notification about the location service.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
From Android O, a notification is mandatory in order to run a service while the app is in the background.
If you look into Android's notification settings for Firefox, you should be able to see different notification categories, including one for "Mozilla Location Services". You could try disabling the notification for that, although I'm not sure if that has any effect on notifications displayed for running services [1].

If changing the notification category settings doesn't help, I think the only thing that could be done would be to turn the Stumbler configuration into a tri-state option:
1. Disable
2. Run only when Firefox starts - doesn't require a notification, but when Firefox goes into the background, the service will be stopped after a while
3. Run in background - only possible with a notification on Android O and later.

[1] The possibilities are
- the notification is hidden, but the service can still run as a foreground service because it was the user's decision to hide the notification
- the notification is hidden and the service can no longer run as a foreground service
- a notification that is shown because a service wants to run in the foreground cannot be hidden, even if the user disabled notifications for that category

I didn't find a definitive answer and I can't easily try it out either, but what I found tended to point towards the last option, i.e. foreground service notifications cannot be disabled by the user.
> From Android O, a notification is mandatory in order to run a service while the app is in the background

Aha, got it.

> If you look into Android's notification settings for Firefox, you should be able to see different notification categories, including one for "Mozilla Location Services". You could try disabling the notification for that, although I'm not sure if that has any effect on notifications displayed for running services

Yes, that totally solves it. See the attached screenshot. I got to this page by long pressing the "Mozilla Location Services" notification, pressing the "i" information icon which took me to the "App info" settings page in android for Firefox, then I went to "Notification" at which point I was shown the screenshotted options.

So this sequence is a bit complicated and I worry that with the release of Android O that people will stop sharing location data with Mozilla to get rid of the notification (not knowing that users have such granular control over which Firefox notifications are allowed and which ones are blocked)

Would it make sense to communicate this to users somehow in the Firefox UI (that they have control over this, just not within the Firefox app)?

> turn the Stumbler configuration into a tri-state option

So this brings up a good point.

It might be good to allow users to choose to either share location data when they're using Firefox or to share location data all the time.

Anyhow, I'm able to workaround this with the notification settings that you mention in android so feel free to close this, though I worry about others encountering the same issue as I did and not knowing about the workaround. Hopefully only power users are sharing location data with Mozilla and so they'll figure it out? I don't know. :JanH thanks so much for guidance on this!
(In reply to Gene Wood [:gene] from comment #20)
> So this sequence is a bit complicated and I worry that with the release of
> Android O that people will stop sharing location data with Mozilla to get
> rid of the notification (not knowing that users have such granular control
> over which Firefox notifications are allowed and which ones are blocked)

One thing I'd like to do is bug 1494026 to make the notification category settings more accessible, although my bug queue is a bit long at the moment.
Interesting that this apparently works, although it would be good to verify that a user-blocked notification still counts as a foreground notification for the purposes of keeping the service running.

In theory we could also change the default priority of the MLS notification channel to make it hidden by default, although in a way this is of course circumventing Google's intentions, so we should tread carefully here and not do this lightly.
(In reply to Jan Henning [:JanH] from comment #22)
> In theory we could also change the default priority of the MLS notification
> channel to make it hidden by default, although in a way this is of course
> circumventing Google's intentions, so we should tread carefully here and not
> do this lightly.

While the other problem is that people might not want to read that kind of things and then end up complaining about the notification anyway, the ethically better option would be to do bug 1494026 and then, when enabling Stumbler for the first time (or the first launch if it's enabled by default on Nightly?), somehow succinctly show a message to educate the user that they can disable the notification if they wish.

(In reply to Jan Henning [:JanH] from comment #19)

If changing the notification category settings doesn't help, I think the
only thing that could be done would be to turn the Stumbler configuration
into a tri-state option:

  1. Disable
  2. Run only when Firefox starts - doesn't require a notification, but when
    Firefox goes into the background, the service will be stopped after a while
  3. Run in background - only possible with a notification on Android O and
    later.

[1] The possibilities are

  • the notification is hidden, but the service can still run as a foreground
    service because it was the user's decision to hide the notification
  • the notification is hidden and the service can no longer run as a
    foreground service
  • a notification that is shown because a service wants to run in the
    foreground cannot be hidden, even if the user disabled notifications for
    that category

I didn't find a definitive answer and I can't easily try it out either, but
what I found tended to point towards the last option, i.e. foreground
service notifications cannot be disabled by the user.

Seems like we could use some product input on this issue.

Andreas, how should we proceed further with this ?

Flags: needinfo?(abovens)

I didn't find a definitive answer and I can't easily try it out either, but what I found tended to point towards the last option, i.e. foreground service notifications cannot be disabled by the user.

Actually I've received some reports to the contrary, though I can't remember where. Plus I've finally managed to test this on an emulator myself and it seems indeed that even designated foreground notifications can be hidden through the notification channel system. Plus according to the adb shell dumpsys activity services output, the service is still counted as a "foreground" service in that case.

So in that case I think the main thing is that I should finally find some time for bug 1494026, plus maybe we should investigate some other ways of better promoting this way of choosing which notifications to show or not.

When long-pressing the notification, I get an option to "Minimize" it, which prevents it from popping up again.

Flags: needinfo?(abovens)
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: REOPENED → RESOLVED
Closed: 3 years ago11 months ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.