-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Revisit Leanplum device id generation #15593
Comments
Testing results: ✅ Leanplum persists the device identifier at cold startI did the following two times:
It consistently shows the same push and deviceId identifiers. ✅ Leanplum does not persist the device identifier between app installsI did the following two times:
It consistently shows the same push token and a new Leanplum deviceId. (Assuming the push token is connected to some app/device combination, so I assume that is correct - and also out of our control) ✅ On a migrated device, the device identifier is inherited from the old Fennec settings
The leanplum device id was properly migrated over from Fennec. ✅ Deeplinks validate and work properly
Push notification with deep link works: it arrives and tapping it opens Fenix Beta and opens the right link (Also confirmed that the above steps do not work with Fenix Beta 82.0.0-beta.2.) |
Since this all looks pretty good - I've added this patch to the uplift plan. |
Hi, I've just checked this on 82.0.0-beta.3 using a Google Pixel 3a (Android 11) ✅ 1️⃣ Leanplum persists the device identifier at cold start• Fresh install of Firefox Beta► Leanplum Device ID: c360efbf-61bb-4739-8ed9-9cda6ade1cc2 ► Log after running
• Force stop Firefox beta and re-launch it► Leanplum Device ID: c360efbf-61bb-4739-8ed9-9cda6ade1cc2 ► Log after running
📝Notes✔️ Consistently shows the same push token and device ID identifiers. ✅ 2️⃣ Leanplum does not persist the device identifier between app installs• Fresh install of Firefox Beta► Leanplum Device ID: ffebba05-938e-48ff-b157-0ac70a5329ee ► Log after running
• Delete Firefox beta and Re-install it using the .apk from task index (not available yet on Play Store)► Leanplum Device ID: 0e309c95-6eea-4d47-b8d5-a16c124a01bb ► Log after running
📝Notes:✔️ A new device ID and push token are generated and assigned after reinstalling Firefox Beta ❓ 3️⃣ On a migrated device, the device identifier is inherited from the old Fennec settings• Fresh install of Fennec Beta 68.7b1► Leanplum Device ID: ccddf528-eb11-455a-9c34-0ad76424601e ► About:config • Upgrade to Firefox Beta 82.0.0-beta.3► Leanplum Device ID: ccddf528-eb11-455a-9c34-0ad76424601e ► Log after running
► ❔ Force closed Firefox Beta 82.0.0-beta.3 and re-run ► Re-checked on Leanplum • Sent a Push Notification VIA Leanplum✔️ Properly sent the Push Notification VIA Leanplum based on the User ID 📝Notes:✔️ The device ID was inherited from Fennec Beta Fennec : @st3fan could you please review and advise? |
The push token changing is fine. That is expected. |
Many thanks! |
This issue replaces #15586 with a new approach. We now understand the situation better and have come to a different conclusion. Summarized, I think this should be our strategy:
Simplify
deviceId
generation to beLeanplum.setDeviceId(randomUUID().toString())
This is exactly what we had before #13230 where we thought creating a new UUID on every cold start was a bad idea. But that assumption was wrong - the Leanplum SDK will ignore new DeviceIDs once they have been set. We verified this in the SDK code.
Leanplum.setDeviceId(randomUUID().toString())
This will work properly for new installs and migrated installs:
Do not cache any identifier and depend on
Leanplum.getDeviceId()
as the source of truthuid
check we do in the DeepLinkValidator (how this all started)Fortunately these changes actually simplify things a lot and are much more about code removing and relying on the Leanplum SDK as the source of truth.
Context
There is a lot of context in the following issues:
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: