Closed Bug 1385853 Opened 7 years ago Closed 6 years ago

[LeanPlum] - Default browser is still triggered if app was set as default from another app

Categories

(Firefox for Android Graveyard :: General, defect, P1)

ARM
Android
defect

Tracking

(fennec+, firefox56- wontfix, firefox59 wontfix, firefox60 wontfix, firefox61 affected)

RESOLVED WORKSFORME
Tracking Status
fennec + ---
firefox56 - wontfix
firefox59 --- wontfix
firefox60 --- wontfix
firefox61 --- affected

People

(Reporter: bsurd, Assigned: petru)

References

Details

(Whiteboard: [Leanplum] [61])

Attachments

(1 file)

Device:
 - LG G4 (Android 5.1);
 - Huawei MediaPad M2 (Android 5.1.1;

Steps to reproduce:
1. Open Gmail and from any mail open and link;
2. When prompted to select a browser select Fennec and then tap on always (or check  use as default browser and tap on ok);
3. Open Fennec and trigger any Default Browser action.

Expected result:
 None of the Default Browser triggers should be triggered since Fennec is set as the Default Browser

Actual result:
 If Fennec is set as the Default Browser when opening up a link from another app the trigger still occurs.

Notes:
 - When setting the app as the default browser from the settings everything works as expected.
 - The LG G4 with an android version of 5.1 does not have the option to set the Default Browser from the Settings menu.
[Tracking Requested - why for this release]:
tracking-fennec: ? → +
My understanding is MMA SDK integration is planned for 56, changing the tracking nom from 57 to 56.
Track 56+ as MMA SDK is enabled in 56.
We check if Fennec is set as default browser when we launch Fennec app.
That means if the default browser setting changes while the app is still running, we'll still think Fennec is not set as default.
This is a design limitation cause we shouldn't check the setting too often.
I think this bug should be marked as invalid and won't fix. thus shouldn't track for 56+
Flags: needinfo?(wehuang)
Flags: needinfo?(jcheng)
Flags: needinfo?(gchang)
Flags: needinfo?(bogdan.surd)
It's a good catch but a design limitation currently as Nevin said. Need a discussion with Product(maybe UX as well) to assess its priority. (personally prefer to fix it as P2, if feasible).

@Joe, how do you think?
Flags: needinfo?(wehuang)
currently we only promote setting default browser using dialog at app start so this bug seems to be avoided by our current campaign setup. We need to pay attention to this once we start using banner messages.
Flags: needinfo?(jcheng) → needinfo?(jcollings)
Flags: needinfo?(gchang)
Flags: needinfo?(jcollings)
There are other triggers we are using to get users to change their default browser to Firefox but the dialog at app start is the most successful one so far - agree, let's keep an eye on this when we start using banners.
Flags: needinfo?(bogdan.surd)
Please remove 56 tracking since I don't know when I will have time to fix it.
Assignee: cnevinchen → nobody
(In reply to Gerry Chang [:gchang] from comment #3)
> Track 56+ as MMA SDK is enabled in 56.

Hi Gerry, per comment 6 and comment 7 this is not blocking 56 (the "banner" feature is currently in the backlog, not yet implemented), would you help remove the tracking flag accordingly? Thanks.
Flags: needinfo?(gchang)
Flags: needinfo?(gchang)
[triage] Bulk edit: product thinks leanplum is high priority: P1 rank 1.
Rank: 1
Priority: -- → P1
Whiteboard: [Leanplum]
Whiteboard: [Leanplum] → [Leanplum] [60]
Product team would like this fixed in 60, tracked as blocking to ensure it's closely monitored.
Jean, per your comment here https://bugzilla.mozilla.org/show_bug.cgi?id=1385853#c7, what exactly do we need to do under this ticket? I'm not sure I understand the ask.
Flags: needinfo?(jcollings)
The main concern here is that we will show a "hey change your browser settings so that Firefox is your default browser" message to users who already have Firefox as a default. 

How do we make sure that we don't show this type of message to users who already set Firefox as default?
Flags: needinfo?(jcollings) → needinfo?(sdaswani)
Understood Jean, we will work on it for 60.
Flags: needinfo?(sdaswani)
Assignee: nobody → petru.lingurar
I investigated this issue and found the following:
- To make sure we won't show the "Default Browser" banner if Fennec was already set as default (while the app was running) we need to recheck and sync this bool value everytime the app shows on the screen (like after coming back to Fennec from System Settings)
- Unfortunately LP does not allow by default rechecking the conditions to decide message's opportunity as per https://support.leanplum.com/hc/en-us/articles/115003470566-How-and-when-are-targets-evaluated- 
"For In-app messages, targets are evaluated at the start of a new session (Leanplum.start). If the user fits the target criteria at app start, the message will be synced to their device with all appropriate triggers and other settings.
But, if the user’s relevant segment criteria changes during that session, the user won’t be re-evaluated as a target till the start of their next session."

Hence for whenever we detect a change in default browser's status I see three possible approaches to update the attributes on server and get the updated list of messages:
1) Do a local modification of LeanPlum SDK files so that we can inject ourselfs to check if a message should be shown or not.
We could check if the message in process of being displayed has the action we know it's used for setting the default browser and stop the display process.
While this would work at runtime without needing to restart LeanPlum it does bring the inherent costs of modifying a 3rd party sdk, using hard-coded values and will add a performance penalty for checking everytime, every message if it needs to be displayed or not.

2) - Resync with LeanPlum server without restarting LP
        Leanplum.setUserAttributes(<new default browser attibute>);
        Leanplum.forceContentUpdate();
is not possible because even in this case LeanPlum will not get a new updated list of messages to work with.

    - Actually restart LeanPlum to force syncing of the new attributes and download an updated list of messages.
I ended up using this approach as I found it to be the least intrusive and the least expensive method.
Attachment #8962415 - Flags: review?(michael.l.comella)
Petru thanks for the submission here. Upon understand the options to fix it, I am wary to actually fix it, and I go back to what Nevin said here: https://bugzilla.mozilla.org/show_bug.cgi?id=1385853#c4

Jean, while this fix may work, it adds some odd processing to catch what may not happen much. Restarting LP in session seems heavy duty and risky.

Can we talk to Evan about this Jean and see what he recommends?
Flags: needinfo?(jcollings)
Attachment #8962415 - Flags: review?(michael.l.comella)
Sounds good.
Flags: needinfo?(jcollings)
Sushee e-mailed LP about this.
Flags: needinfo?(sdaswani)
Flags: needinfo?(sdaswani)
Whiteboard: [Leanplum] [60] → [Leanplum] [61]
Removing blocking flag for 60 per whiteboard update.
In my discussion with LP, they say we just need to disable the magnet to make sure that the user's properties are re-evaluated at startup.
Then we are left with what Nevin said in https://bugzilla.mozilla.org/show_bug.cgi?id=1385853#c4

>> We check if Fennec is set as default browser when we launch Fennec app.
>> That means if the default browser setting changes while the app is still running, we'll still think Fennec is not set as default.
>> This is a design limitation cause we shouldn't check the setting too often.
>> I think this bug should be marked as invalid and won't fix. thus shouldn't track for 56+

If the LP campaign showing this message is set to only show it when the app starts (not resumed) the user should not be affected by the issue described in this ticket.
Flags: needinfo?(sdaswani)
That makes sense Petru, thanks for the clarification. I will talk to the Product folks about this.
Flags: needinfo?(sdaswani) → needinfo?(kplam)
Flags: needinfo?(kplam) → needinfo?(cpark)
Will have team test to see if this is a non-issue.
Hey Team - 

I was able to reproduce the steps listed above, and the event trigger is working correctly. 

The results from testing on a Google Pixel: Once a user sets Fx as their default browser, they will not receive messaging to set Fx as their default browser
Flags: needinfo?(cpark)
Great Kat, I'll close this now. Thanks for your help everyone!
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: