Android
Websites these days ask for your permission to display notifications straight on your browser like Google Chrome for Android. Not many people would want to give sites authorization to allow them to show notifications at random intervals. But have you, at times, accidentally clicked the "Yes" option? Clicking yes means you will receive notifications at different times of the day. There might be an off switch to disable notifications completely from Chrome but you just want to remove that particular website from the list.
Notifications are basically sent when the sites have new content to share. It is a good thing that this permission can be easily managed in Google Chrome (and other browsers as well). This tutorial deals with disabling and managing websites from displaying notifications after you have given permission to them to do so in Google Chrome browser.
To disable/block individual websites from displaying notifications in Google Chrome for Android and other smartphones, follow these steps:
- Go to the three dots ⋮ settings menu
- Tap on Settings
- Scroll down to Site settings under Advanced
- Tap on Notifications
- Tap on the particular website under Allowed
- Hit Clear & Reset to remove the notification permission or tap on Notifications
- Drag the On slider to the Left by tapping on it and turning it Off
Note: Pressing on Clear & Reset will remove the site from the Allowed list. It will not add it to the Blocked list. When you clear and reset, you might end up visiting the web page again and it might again ask you for the permission to show notifications. You can block it from that prompt. Also, removing any website from the Blocked list will give it the permission to display the prompt again.
If you want to block it straight away, navigate to Notifications and drag the On slider to Off. It will add it to the blocked list. It means it won't show you the prompt to display notifications again.
There is also a top-level Notifications option in ⋮ > Settings > Site settings > Notifications. Turning it off will disable all websites from prompting you for the permission.
To disable or go to the same settings in your computer, follow these steps:
- Navigate to chrome://settings/content/notifications in your address bar in Google Chrome.
- Manage the Block and Allow list there.
- You can also turn it off completely using the Ask before sending slider.
developers
If you are trying to integrate admob advertisements, then it is wise to test it first. During development, it is recommended that you avoid false ad impressions as well as clicks. For that purpose, it is widely suggested that you just use test advertisements which displays a placeholder instead of a live advertisement. To get such test ads, you need to pass your hashed device ID to to AdRequest.Builder.addTestDevice().
Here is an example of how the code looks like:
AdRequest request = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addTestDevice(“A2435BEFF94D5EFCFA0F050455C56347”)
.build();
You need to find the unique hashed device id to add it to your code. The simplest way to find it in Android Studio is to look at the logcat in Android Monitor.
Here are the steps:
- Connect your test device with drivers installed, Developer Options and USB debugging enabled.
- In the bottom of Android Studio, click on Android Monitor and make sure the tab logcat is active.
- You will see a lot of messages. Type addTestDevice in the search field to filter the text.
- You will find your unique hashed device id in the results.
If you cannot find it using the logcat then you can use an app that displays the same device id.
Here is the link to the application in Google’s Play Store.
I hope that helps you out in testing your advertisements and monetizing your application.