question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom ad notifications are not shown when system notifications are disabled

See original GitHub issue

We should fall back to custom ad notifications when system notifications are disabled

Follow up to: https://github.com/brave/brave-variations/pull/120

Should show custom ad notifications:
- For all Windows versions If native notifications are disabled (should not be shown if Focus Assist is enabled)

Steps to Reproduce

  1. Disable native(system) notifications
  2. Run Brave with --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true --variations-server-url=https://variations.bravesoftware.com/seed
  3. Restart Brave
  4. Make sure variations are downloaded in brave://version
  5. Enable rewards and ads
  6. Trigger an ad

Actual result:

Notification is not shown at all

Expected result:

Custom notification is shown

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

Brave 1.30.84 Chromium: 94.0.4606.54 (Official Build) (64-bit)
Revision c8191a1d5cccbf64e8fe7269043f8ace8d74dd05-refs/branch-heads/4606@{#1130}
OS Windows 10 Version 20H2 (Build 19042.1237)

cc @brave/legacy_qa @rebron @tmancey @jsecretan

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
btlechowskicommented, Sep 27, 2021

Needs to be verified along with https://github.com/brave/brave-variations/pull/128

Verification should include all test cases from https://github.com/brave/brave-variations/pull/120

0reactions
GeetaSarvadnyacommented, Oct 12, 2021

Verification passed on Gionee s5 with Android 5.1 running Bravearm 1.30.89.apk build

1. Verified when system native notifications are disabled and variations seed enabled, custom ads notification is shown based on BraveAds.ShowCustomAdsNotificationOnAndroidStudy: Enabled being enabled

Steps followed:

  1. Run the cmd mentioned in the screenshot below image
  2. Install bravearm.apk on Android 5
  3. Disable native app notifications in Android 5 (navigate to Android 5>Advanced settings>Apps>Brave, uncheck Receive app notifications checkbox)
  4. Check brave://version and ensured enable custom ad notification seed isn’t downloaded
  5. Restart browser, check brave://version and ensured BraveAds.ShowCustomAdsNotificationOnAndroidStudy: Enabled seed is downloaded
  6. Enable rewards and ads
  7. Custom ads are served
Native app notification disabled Custom ad study enabled Custom ad notifications shown
image image image

2. Verified when system native notifications are enabled, native ad notifications are shown

Steps followed:

  1. Run the cmd mentioned in the screenshot below [Note: make sure to run adb.exe shell "rm /data/local/tmp/brave-test-variations-server-url" otherwise it will pull the variation seed from the server and you will get always custom ads even though native app notifications are enabled] image
  2. Install bravearm.apk on Android 5
  3. Make sure native app notifications are enabled in Android 5
  4. Check brave://version and ensured enable custom ad notification seed isn’t downloaded
  5. Restart the browser, check brave://version and ensure enable custom ad notification seed isn’t downloaded
  6. Enable rewards and ads
  7. Default ads are served
Native app notification enabled Custom ad study NOT enabled Default ad notifications shown
image image image
Read more comments on GitHub >

github_iconTop Results From Across the Web

Ad notifications are not displayed on macOS Catalina #6466
A workaround is to disable native notifications for Brave Browser on macOS ... Custom notifications will not be displayed in the macOS ...
Read more >
Change notification and quick settings in Windows
Customize notifications. Select Start > Settings > System > Notifications. Change notification settings. Do any of the following: Select Notifications to ...
Read more >
Change Notifications settings on Mac - Apple Support
On your Mac, change how notifications appear in Notification Center and specify ... Apple menu > System Settings, then click Notifications in the...
Read more >
Control notifications on Android - Google Support
Open your phone's Settings app. ... Notifications on lock screen. Choose your phone's notification defaults: Show conversation, default, and silent; Hide silent ...
Read more >
Notification runtime permission - Android Developers
For your app to be eligible for an automatic pre-grant, it must have an existing notification channel and not have its notifications explicitly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found