Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the UI settings part of #1854 #2027

Closed
anthonypkeane opened this issue Aug 30, 2019 · 2 comments

Comments

@anthonypkeane
Copy link
Collaborator

commented Aug 30, 2019

Description

Implement the setting for #1854

In settings > Brave Rewards
add

Show Ads when Brave is not in use

Have a toggle for On | Off as we do on the Home Page settings
Default is On

Please this ad settings above "Reset Brave Rewards", moving that down a little

Ad Notification.jpg

@tmancey

This comment has been minimized.

Copy link
Collaborator

commented Sep 12, 2019

Test plan:

Disable background notifications:

  • Confirm ads work as expected based upon previous use cases (before this change)

Enable background notifications:

  • Confirm ads are shown when the browser is in the background
  • Confirm ads are not shown in the background between 9pm and 6am
deeppandya added a commit that referenced this issue Sep 12, 2019
* Update UI for #2027

* Update ad switch preference
@deeppandya deeppandya closed this Sep 13, 2019
@srirambv

This comment has been minimized.

Copy link
Collaborator

commented Sep 23, 2019

Verification passed on OnePlus 6T with Android 9.0 running 1.4.0 rc3 x64 build

  • Verified new settings is shown under Menu->Brave Rewards
    image
  • Verified with setting enabled, ads are shown even if the app is in background/device is locked
    full_log.txt
    2019-09-23 11:31:08.465 19722-19722/? I/chromium: [INFO:ads_service_impl.cc(1511)] AdsService Event Log: {"data":{"type":"background","stamp":"2019-09-23T11:31:08Z"}}
    2019-09-23 11:31:09.060 19870-19901/? I/chromium: [INFO:ads_impl.cc(468)] OnTabUpdated.IsBlurred for tab id: 9 and url: https://www.toyota.com/
    2019-09-23 11:31:09.077 19722-19722/? I/chromium: [INFO:ads_service_impl.cc(1511)] AdsService Event Log: {"data":{"type":"blur","stamp":"2019-09-23T11:31:09Z","tabId":9}}
    2019-09-23 11:31:09.094 19870-19901/? I/chromium: [INFO:client.cc(295)] Successfully saved client state
    2019-09-23 12:03:46.960 19870-19901/? I/chromium: [INFO:ads_impl.cc(1365)] OnTimer: 
          timer_id: 6
          collect_activity_timer_id_: 4
          deliverying_notifications_timer_id_: 6
          sustained_ad_interaction_timer_id_: 0
    2019-09-23 12:03:46.966 19870-19901/? I/chromium: [INFO:ads_impl.cc(1111)] DoesHistoryRespectAdsPerDayLimit:
    2019-09-23 12:03:46.966 19870-19901/? I/chromium: [INFO:ads_impl.cc(1112)]     respects_day_limit: 1
    2019-09-23 12:03:46.967 19870-19901/? I/chromium: [INFO:ads_impl.cc(1071)] IsAllowedToShowAds:
    2019-09-23 12:03:46.967 19870-19901/? I/chromium: [INFO:ads_impl.cc(1072)]     does_history_respect_minimum_wait_time: 1
    2019-09-23 12:03:46.967 19870-19901/? I/chromium: [INFO:ads_impl.cc(1074)]     does_history_respect_ads_per_day_limit: 1
    2019-09-23 12:03:46.967 19870-19901/? I/chromium: [INFO:ads_impl.cc(814)] Notification for category automotive-car brands
    2019-09-23 12:03:46.970 19870-19901/? I/chromium: [INFO:ads_impl.cc(1206)] Stopped delivering notifications
    2019-09-23 12:03:46.971 19870-19901/? I/chromium: [INFO:ads_impl.cc(1189)] Start delivering notifications in 1800 seconds
    2019-09-23 12:03:46.971 19870-19901/? I/chromium: [INFO:ads_impl.cc(849)] Notification not made: No ads found in "automotive-car brands" category, trying again with "automotive" category
    2019-09-23 12:03:46.984 19870-19901/? I/chromium: [INFO:client.cc(295)] Successfully saved client state
    2019-09-23 12:03:46.987 19870-19901/? I/chromium: [INFO:ads_impl.cc(872)] Found 14 out of 14 availables ads for "automotive" category
    2019-09-23 12:03:46.987 19870-19901/? I/chromium: [INFO:ads_impl.cc(1012)] Notification shown:
       id: df264d4d-404b-41df-add1-c925e9d6392a
       campaign_id: 00654820-7977-4c1d-8c82-eb7237a6a763
       winnerOverTime: automotive-car brands
       advertiser: Express VPN
       category: automotive
       text: #1 Trusted leader in VPN. Access Anything Blocked Online.
       url: https://mozgvya.com/path/lp.php?trvid=10008&trvx=518abffe&var1=29_automotive
       uuid: 4e41382a-c7b3-4de1-b680-9ff8304ca095
    2019-09-23 12:03:46.987 19870-19901/? I/chromium: [INFO:notifications.cc(261)] Saving notifications state
    2019-09-23 12:03:47.005 19722-19722/? I/chromium: [INFO:ads_service_impl.cc(1511)] AdsService Event Log: {"data":{"type":"notify","stamp":"2019-09-23T12:03:47Z","notificationType":"generated","notificationClassification":["automotive"],"notificationCatalog":"863ff6c5-0230-4078-88d7-ccfb42c8ace0","notificationUrl":"https://mozgvya.com/path/lp.php?trvid=10008&trvx=518abffe&var1=29_automotive"}}
    2019-09-23 12:03:47.006 19722-19722/? I/chromium: [INFO:ads_service_impl.cc(1511)] AdsService Event Log: {"data":{"type":"confirmation","stamp":"2019-09-23T12:03:47Z","notificationId":"4e41382a-c7b3-4de1-b680-9ff8304ca095","notificationType":"view"}}
    2019-09-23 12:03:47.006 19839-19892/? I/chromium: [INFO:confirmations_impl.cc(1037)] Confirm ad:
       id: df264d4d-404b-41df-add1-c925e9d6392a
       creative_set_id: 863ff6c5-0230-4078-88d7-ccfb42c8ace0
       advertiser: Express VPN
       category: automotive
       text: #1 Trusted leader in VPN. Access Anything Blocked Online.
       url: https://mozgvya.com/path/lp.php?trvid=10008&trvx=518abffe&var1=29_automotive
       uuid: 4e41382a-c7b3-4de1-b680-9ff8304ca095
       type: view
    
    
    

Verification passed on Samsung Tab A with Android 9.0 running 1.4.0 RC4 x64 build

  • Verified new settings is shown under Menu->Brave Rewards
  • Verified with setting enabled, ads are shown even if the app is in background/device is locked
    TabBackgroundAdsLog.txt
samartnik added a commit that referenced this issue Sep 27, 2019
* Update UI for #2027

* Update ad switch preference
samartnik added a commit that referenced this issue Sep 27, 2019
* Update UI for #2027

* Update ad switch preference
samartnik added a commit that referenced this issue Oct 9, 2019
* Update UI for #2027

* Update ad switch preference
samartnik added a commit that referenced this issue Oct 10, 2019
* Update UI for #2027

* Update ad switch preference
samartnik added a commit that referenced this issue Oct 11, 2019
* Update UI for #2027

* Update ad switch preference
samartnik added a commit that referenced this issue Oct 17, 2019
* Update UI for #2027

* Update ad switch preference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.