Closed Bug 1400150 Opened 7 years ago Closed 7 years ago

Use Swtichboard to enable Leanplum debugging

Categories

(Firefox for Android Graveyard :: Metrics, enhancement)

56 Branch
enhancement
Not set
normal

Tracking

(firefox57 fixed)

RESOLVED FIXED
Firefox 57
Tracking Status
firefox57 --- fixed

People

(Reporter: cnevinchen, Assigned: cnevinchen)

Details

(Whiteboard: [FNC][SPT58.1][INT][LP_M2])

Attachments

(1 file)

When we debug Leanlpum, we need to know the user's Leanplum user id. This bug is to create a user id for debugging so that we can set it in Leanplum backend and test againstt it. The only way to use this is via Switchboard. It will always to be false in Kinto, but testers can enable it using switchboard add-on(with very tedious setup steps.) This will largely help our testers (SV mainly) to test issues.
Please note, this debugging user id needs to be setup before first use. This is because Leanplum SDK will cache that user ID during SDK initialization.[1] So when first setting up switchboard add-on in about:experiments, you need to enable it(leanplum-debug) with leanplum-start I've requested Kinto update and approved by Jing Wei. The test preparation SOP will be 1. Clean install 2. Install Switchboard add-on 3. enable leanplum-start and leanpum-debug 4. you will have a fixed user id , e.g. 8effda84-99df-11e7-abc4-cec278b6b50a 5. we can use this user id in LP backend and target it as the only user and test messages on it. All the device with this test user id will see the same dialog. But only the last started device will receive the push message (Since it'll override the device push token for the test user id). [1] http://searchfox.org/mozilla-central/rev/2c9a5993ac40ec1db8450e3e0a85702fa291b9e2/mobile/android/thirdparty/com/leanplum/internal/VarCache.java#360
Assignee: nobody → cnevinchen
Comment on attachment 8908541 [details] Bug 1400150 - Use Swtichboard to enable Leanplum debugging. https://reviewboard.mozilla.org/r/180176/#review186014 ::: mobile/android/base/java/org/mozilla/gecko/mma/MmaDelegate.java:101 (Diff revision 2) > mmaHelper.setGcmSenderId(PushManager.getSenderIds()); > + mmaHelper.setDeviceId(getDeviceId(activity)); Add a comment indicates these two config setup required to be invoked before Leanplum.start in mmaHelper.init. ::: mobile/android/base/java/org/mozilla/gecko/mma/MmaDelegate.java:197 (Diff revision 2) > + private static String getDeviceId(Activity activity) { > + if (SwitchBoard.isInExperiment(activity, Experiments.LEANPLUM_DEBUG)) { > + return DEBUG_LEANPLUM_DEVICE_ID; > + } > + > + final SharedPreferences sharedPreferences = activity.getPreferences(0); replace 0 as MODE_PRIVATE
Attachment #8908541 - Flags: review?(max) → review+
Tested on Pixel C, Nexus 5, Pixel
Pushed by nechen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3045288dcb2e Use Swtichboard to enable Leanplum debugging. r=maliu
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Whiteboard: [FNC][SPT58.1][INT]
Whiteboard: [FNC][SPT58.1][INT] → [FNC][SPT58.1][INT][LP_M2]
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: