bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

[LeanPlum] - Push Notifications don't work if the user closes Fennec

VERIFIED FIXED in Firefox 57

Status

()

Firefox for Android
General
P1
blocker
VERIFIED FIXED
10 months ago
10 months ago

People

(Reporter: BogdanS, Assigned: Nevin Chen(Not active on Bugzilla))

Tracking

(Blocks: 1 bug, {qablocker})

57 Branch
Firefox 57
ARM
Android
qablocker
Points:
---

Firefox Tracking Flags

(firefox57 verified)

Details

(Whiteboard: [LP_M2][FNC][SPT57.3][INT])

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

10 months ago
Device: 
 - Huawei Honor 8 (Android 6);
 - Huawei MediaPad M2 (Android 5.1.1);
 - Motorola Nexus 6 (Android 7.1.1);
 - Samsung Galaxy Note 4 (Android 5.0.1);

Prerequisites:
 - install Switchboard:Experiments and enable LeanPlum 

Steps to reproduce:
 1. After finishing setting up Fennec close it.
 2. Wait for Campaign C to trigger.

Expected result:
 After a 5 minute period, the user should receive PN1 (push notification 1) from campaign C.

Actual result:
 The user does not receive any kind of push notifications.

Notes:
 The user can receive push notifications if the app is running in the foreground or background. He can't receive push notifications any longer after he closes the app.
Comment hidden (mozreview-request)
(Assignee)

Updated

10 months ago
Duplicate of this bug: 1396556

Comment 3

10 months ago
mozreview-review
Comment on attachment 8904386 [details]
Bug 1396548 - Handle Push Notification when app is not running.

https://reviewboard.mozilla.org/r/176184/#review181128

::: mobile/android/base/java/org/mozilla/gecko/mma/MmaDelegate.java:150
(Diff revision 1)
>          final Tab selectedTab = Tabs.getInstance().getSelectedTab();
> -        // if selected tab is null or private, mma should be disabled.
> -        final boolean isInPrivateBrowsing = selectedTab == null || selectedTab.isPrivate();
> -        return inExperiment && healthReport && isGeckoPrefOn && !isInPrivateBrowsing;
> +
> +        // if selected tab is private, mma should be disabled.
> +        final boolean isInPrivateBrowsing = selectedTab != null && selectedTab.isPrivate();
> +
> +        return (inExperiment || isGeckoPrefOn) && healthReport && !isInPrivateBrowsing;

Maybe add a comment describe why do we make isExperiment and isGeckoPrefOn OR, is it because of switchboard addon not available from 57? or is it because of GeckoThread might not be ready when GCM arrived?
Attachment #8904386 - Flags: review?(max) → review+
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 6

10 months ago
Pushed by nechen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/079ab7573850
Handle Push Notification when app is not running. r=maliu
https://hg.mozilla.org/mozilla-central/rev/079ab7573850
Status: NEW → RESOLVED
Last Resolved: 10 months ago
status-firefox57: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57

Updated

10 months ago
Whiteboard: [LP_M2]

Updated

10 months ago
Whiteboard: [LP_M2] → [LP_M2][FNC][SPT57.3][INT]
(Reporter)

Comment 8

10 months ago
Hello,

Verified this fix on multiple devices and it's working as expected.
Status: RESOLVED → VERIFIED
tracking-fennec: ? → ---
status-firefox57: fixed → verified
You need to log in before you can comment on or make changes to this bug.