Closed Bug 1396548 Opened 2 years ago Closed 2 years ago
Plum] - Push Notifications don't work if the user closes Fennec
59 bytes, text/x-review-board-request
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 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+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/079ab7573850 Handle Push Notification when app is not running. r=maliu
Hello, Verified this fix on multiple devices and it's working as expected.
You need to log in before you can comment on or make changes to this bug.