Skip to content

Conversation

@marcosholgado
Copy link
Contributor

@marcosholgado marcosholgado commented Apr 27, 2021

Task/Issue URL: https://app.asana.com/0/inbox/1125189844075764/1200252649107473/1200229532781040
Tech Design URL:
CC:

Description:
This PR disabled the previous experiment and creates two new variants. The experimental variant now enables all the inactive notification as long as the don't clash with the UOA notification. If that's the case we delay the inactive notification by one day.

Before testing
In the AndroidNotificationScheduler change lines 85 and 89 so they pass TimeUnit.SECONDS instead of days.

In the AndroidNotificationScheduler change line 102 to return duration * 10 to give the notification more than 1 second to be sent.

Steps to test this PR:
ZY experimental variant
Change the variant to always use zy

Day 0

  1. Before installing the app change the line 39 in AppInstallStore to return 0
  2. Install the app and launch it
  3. In the logcat, if you filter by notificationyou should see
  4. Inactive notification days installed is 0 day is 1
  5. Scheduling notification for 10 -> scheduled for 1 day later
  6. After 10 seconds the notification should show up
  7. Dismiss the notification and bring the app to the foreground
  8. Bring the app back to the foreground
  9. In the logcat, if you filter by notificationyou should see
  10. Inactive notification days installed is 0 day is 3
  11. Scheduling notification for 40 -> scheduled for 4 days later
  12. After 40 seconds the notification should show up

Day 2

  1. Before installing the app change the line 39 in AppInstallStore to return 2
  2. Install the app and launch it
  3. In the logcat, if you filter by notificationyou should see
  4. Inactive notification days installed is 2 day is 1
  5. Scheduling notification for 20 -> scheduled for 2 days later
  6. After 20 seconds the notification should show up
  7. Dismiss the notification and bring the app to the foreground
  8. Bring the app back to the foreground
  9. In the logcat, if you filter by notificationyou should see
  10. Inactive notification days installed is 2 day is 3
  11. Scheduling notification for 30 -> scheduled for 3 days later
  12. After 30 seconds the notification should show up

Testing any other days (step 1) should always return 10 for the privacy notification and 30 for the clear data notification since those notification cannot clash with the UOA notification out of day 0 and 2.

ZX experimental variant
Change the variant to always use zx

Day 0

  1. Before installing the app change the line 39 in AppInstallStore to return 0
  2. Install the app and launch it
  3. In the logcat, if you filter by notificationyou should see
  4. Inactive notification days installed is 0 day is 1
  5. Scheduling notification for 10 -> scheduled for 1 day later
  6. After 10 seconds the notification should show up
  7. Dismiss the notification and bring the app to the foreground
  8. Bring the app back to the foreground
  9. In the logcat, if you filter by notificationyou should see
  10. Inactive notification days installed is 0 day is 3
  11. Scheduling notification for 30 -> scheduled for 3 days later
  12. After 40 seconds the notification should show up

Day 2

  1. Before installing the app change the line 39 in AppInstallStore to return 2
  2. Install the app and launch it
  3. In the logcat, if you filter by notificationyou should see
  4. Inactive notification days installed is 2 day is 1
  5. Scheduling notification for 10 -> scheduled for 1 day later
  6. After 20 seconds the notification should show up
  7. Dismiss the notification and bring the app to the foreground
  8. Bring the app back to the foreground
  9. In the logcat, if you filter by notificationyou should see
  10. Inactive notification days installed is 2 day is 3
  11. Scheduling notification for 30 -> scheduled for 3 days later
  12. After 30 seconds the notification should show up

Testing any other days (step 1) should always return 10 for the privacy notification and 30 for the clear data notification since those notification cannot clash with the UOA notification out of day 0 and 2.


Internal references:

Software Engineering Expectations
Technical Design Template

@marcosholgado marcosholgado marked this pull request as ready for review April 27, 2021 10:27
Copy link
Contributor

@cmonfortep cmonfortep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments. GJ

Tested and works as described.

@marcosholgado marcosholgado merged commit 17d84c1 into develop Apr 28, 2021
@marcosholgado marcosholgado deleted the feature/marcos/uoa_exp2 branch April 28, 2021 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants