Do not merge - Only here to trigger build for testing Overlay frequency logic in the PR #17475
Do not merge - Only here to trigger build for testing Overlay frequency logic in the PR #17475
Conversation
…rlay' into issue/17330-jetpack-focus-create-generic-fullscreen-overlay-testing
…rlay' into issue/17330-jetpack-focus-create-generic-fullscreen-overlay-testing # Conflicts: # WordPress/src/main/java/org/wordpress/android/ui/jetpackoverlay/JetpackFeatureRemovalOverlayUtil.kt
…rlay' into issue/17330-jetpack-focus-create-generic-fullscreen-overlay-testing
|
|||||||||||
| 💡 Scan this QR code with your Android phone to download and install the APK directly on it. | ||
| App | WordPress | |
| Build Flavor | Jalapeno | |
| Build Type | Debug | |
| Commit | ec5f640 | |
|
|||||||||||
| 💡 Scan this QR code with your Android phone to download and install the APK directly on it. | ||
| App | Jetpack | |
| Build Flavor | Jalapeno | |
| Build Type | Debug | |
| Commit | ec5f640 | |
| setFeatureAccessedOn(3, JetpackOverlayConnectedFeature.STATS) | ||
| setFeatureAccessedOn(2, JetpackOverlayConnectedFeature.NOTIFICATIONS) | ||
| setFeatureAccessedOn(4, JetpackOverlayConnectedFeature.READER) | ||
|
|
There was a problem hiding this comment.
@JB184351 you can comment out or change the values on these lines to test the frequency logic.
Let me know if you need any additional info
There was a problem hiding this comment.
Awesome, thank you! Will do that today!
There was a problem hiding this comment.
I'm trying to change the values but I don't see it applying, I'm not used to running Android Studio so maybe I'm doing something wrong there, but should running the app again apply the code changes? I'm seeing different options that might enable these changes. @AjeshRPai
There was a problem hiding this comment.
Hey @JB184351
but should running the app again apply the code changes?
I am sorry for not giving you more info.
When u want to change the values. You might have to run the app by
- commenting the lines from
118-120 - uncomment the line
123// jetpackFeatureOverlayShownTracker.clear() - run the app.
This will clear all the values. Then to change the values(when the feature was last accessed) , do the reverse.
- Uncomment lines from 118-120
- Comment line 123
You can comment or uncomment the code by putting "//" before each line.
Let me know if you want more information or any help with it
There was a problem hiding this comment.
There was a problem hiding this comment.
Ok I pulled it, so if I wanted to change the time to 2 minutes would I just changed the constant on line 22 to 120000L? Like this? private const val ONE_DAY_TIME_IN_MILLIS = 120000L? Though it looks like it's taking the current system time into account when making the calculation as well. @AjeshRPai. Sorry for all the questions 😅
There was a problem hiding this comment.
Sorry for all the questions
No worries Justin.
So In Android, we have kept the frequency of the overlay logic in days. So it's not possible to check the overlay logic using Minutes/Seconds logic as in IOS. What we can do here is to change the date on which the overlay was last shown.
The first parameter in setFeatureAccessedOn is the no of days elapsed since the feature overlay was shown). So 3 means, it's been 3 days since the feature was accessed. This way when the app launches(the feature-specific overlay for the first phase is 2 days)the feature-specific overlay should be shown as per our requirements.
setFeatureAccessedOn(3(days since overlay was shown), JetpackOverlayConnectedFeature.STATS(feature which was accessed)) setFeatureAccessedOn(2, JetpackOverlayConnectedFeature.NOTIFICATIONS) setFeatureAccessedOn(4, JetpackOverlayConnectedFeature.READER)
Let me know if this makes sense/ if you need any additional info.
There was a problem hiding this comment.
mmm ok, so how would I change it to be only 1 day? Would I just change this variable val featureAccessedMockedTimeinMillis = (System.currentTimeMillis() - (noOfDaysPastFeatureAccessed * ONE_DAY_TIME_IN_MILLIS)) to val featureAccessedMockedTimeinMillis = (System.currentTimeMillis() - (ONE_DAY_TIME_IN_MILLIS))?
…rlay' into issue/17330-jetpack-focus-create-generic-fullscreen-overlay-testing



Part of #17330
This PR is for testing the overlay frequency logic introduced as part of the #17432.
To test:
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txtif necessary.