Closed Bug 1351581 Opened 3 years ago Closed 3 years ago

Limit Leanplum to specific regions (via Switchboard)


(Firefox for Android :: General, enhancement, P1)






(Reporter: sebastian, Unassigned)


(Blocks 1 open bug, )


(Whiteboard: [LP_M1])


(2 files, 1 obsolete file)

We do not want to enable Leanplum for all users. Instead the marketing/product teams want to use it in specific markets.

To determine the region we can use the same approach we already use in SearchEngineManager to determine the (default) search engine(s) for the user/installation.

We want to be able to update those regions without app updates. Therefore we would like to make this configurable by a Switchboard experiment. In Switchboard we can specify the regions as additional values of the experiment.
Note that using Switchboard means it will take some time until we know whether we can use Leanplum. Therefore it won't be available on the first start and we might not be able to use it in the first-run immediately.
Attachment #8867156 - Attachment is obsolete: true
Comment on attachment 8867155 [details]
Bug 1351581 - Add build flag to inject mma implementation.

::: commit-message-5864d:1
(Diff revision 3)
> +Bug 1351581 - Add build flag to inject mma implementation. r?maliu,sebastian,nalexander

I'd really prefer we don't use `mma` everywhere -- it's not a term I'd expect most people to know.  (To me, it means "Mixed Martial Arts", which is ... not right.)

Why not just call this `leanplum`?

::: mobile/android/base/
(Diff revision 3)
> +//#else
> +import;
> +//#endif
> +
> +public class MmaConstants {
> +    public static final String MOZ_INSTALL_MMA_SDK_APP_TOKEN =

I don't see anything about a Leanplum token in the other patches.  What's the status here?  There's work needed to get tokens on the releng builder machines which we should track, if you're not already doing so.

::: mobile/android/base/java/org/mozilla/gecko/mma/
(Diff revision 3)
> +
> +public class MmaDelegate {
> +
> +    private static MmaInterface mmaHelper = MmaConstants.getMma();
> +
> +    public static String FIRST_RUN = "First Run";

Are these events that are relevant to Leanplum?  What happens as these evolve over time?
Attachment #8867155 - Flags: review?(nalexander) → review-
Gah, hit publish before writing my summary comment (different between MozReview and Github reviews!).

I mean to say that this is r- only 'cuz I want to get clarity on the name from our other reviewers and see what you intend with the Leanplum token.  Everything else here looks good.
Priority: -- → P1
Bug 1351585 also covered this bug. Please mark dup.
Flags: needinfo?(whuang)
Closed: 3 years ago
Flags: needinfo?(whuang)
Resolution: --- → DUPLICATE
Duplicate of bug: 1351585
Attachment #8867052 - Flags: review?(max)
Attachment #8867155 - Flags: review?(max)
Comment on attachment 8867052 [details]
Bug 1351581 - Use Switchboard to limit Leanplum startup/init

::: mobile/android/base/java/org/mozilla/gecko/
(Diff revision 1)
> +            @Override
> +            protected Void doInBackground(Void... params) {
> +                super.doInBackground(params);
> +                if (SwitchBoard.isInExperiment(context, Experiments.LEANPLUM) &&
> +                        GeckoPreferences.getBooleanPref(context, GeckoPreferences.PREFS_HEALTHREPORT_UPLOAD_ENABLED, true)) {
> +                    // Do LeanPlum start/init here

I thought this needs to be done in the Application class? Is it enough to do it here in BrowserApp only?

::: mobile/android/base/java/org/mozilla/gecko/
(Diff revision 1)
>      // Enable full bookmark management(full-page dialog, bookmark/folder modification, etc.)
>      public static final String FULL_BOOKMARK_MANAGEMENT = "full-bookmark-management";
> +    // Enable Leanplum SDK
> +    public static final String LEANPLUM = "leanplum-start";

Maybe just "leanplum"?
Attachment #8867052 - Flags: review?(s.kaspari) → review+
Wait. This is already closed. This is pretty confusing. That's the second bug with reviews that has been closed. Please clear the review flags too.
Attachment #8867155 - Flags: review?(s.kaspari)
Whiteboard: [LP_M2]
Whiteboard: [LP_M2] → [LP_M1]
You need to log in before you can comment on or make changes to this bug.