Android’s heads-up alerts are a really helpful feature. When this setting is active, heads-up notifications appear briefly at the top of your screen, saving you the time and effort of having to open the notification drawer each time. Although you can disable this feature entirely, there is no method to do so for just some specific apps. However, certain smartphones, such as the Galaxy S8/S8+ and the OnePlus 5, feature game modes that can disable them for particular apps. Here’s how to disable Android heads-up notifications in any app, though, if you use stock Android or any other skin that doesn’t include such a mode:
Prerequisites to Block Android Heads-Up Notifications
There are a few things you will need before learning how to disable heads-up notifications in games and media apps. The following is a list of those elements for a smooth process:
- Download Tasker (7-day trial, $2.99) and one of its plugins called SecureTask (free).
- Depending on your device OEM, first download the USB drivers and then install them. If you are unsure of how to go about that, the same link has the guidelines for that.
- Download the ADB Binary files according to your platform.
- Download a software like WinRAR to extract compressed files and folders.
- Enable Developer Options on your Android device. You can do this by going to Settings > About phone, and tapping 7 times in succession on Build number .
Note: I’m using a computer running Windows 10 Pro, a Moto G3 that has been rooted, a custom ROM installed, and Android 7.1.1. Any non-rooted smartphone can use the next technique as well.
How to Block Android Heads-Up Notifications in Games or Video Apps
The first thing that springs to mind when considering any system modifications that Android does not come with natively is Tasker. It is a fantastic tool that let you to completely personalise your phone, and the most of them don’t even call for root access. After taking care of the requirements, you can move on to the stages listed below.
- In your phone, go to Developer options and enable USB debugging . In some devices, this may appear as Android debugging . You will be prompted for a confirmation. Tap on OK and then plug in your phone to your computer.
- On your computer, extract the ADB Binary files in a folder. I extracted it on my desktop. Now open this extracted folder and while holding the Shift key, right-click anywhere on the screen. You should now see an option called Open PowerShell window here . Click on this.
The name of this option would be Open command window here if you were not running the most recent version of Windows. Additionally, you can carry out the identical procedure on a Mac by launching Terminal.
- In the PowerShell/Command Prompt window, type adb devices and hit enter. If this was the was first time you did this, you ll get a prompt on your phone. Tap on OK to allow it.
- Again type adb devices in the PowerShell window on your computer followed by hitting enter. This should now list your phone as an attached device. If it doesn t, the drivers didn t get installed properly.
- Now, on your phone, go to Settings > Accessibility > Tasker. Toggle this on, as this will be needed by Tasker in order to recognize the app in use.
- After you do this, open SecureTask and grant all the permissions it requires. Now, back on your computer, in the same Windows PowerShell/Command Prompt window, type adb shell and hit enter. Follow this by execution of the following command:
pm grant com.balda.securetask android.permission.WRITE_SECURE_SETTINGS
- Go back to your phone and open Tasker. Under the Profiles tab, tap on the plus icon on the bottom-right of the screen and then choose Application .
- From the list of apps that you see, select the ones for which you want to block the heads-up notifications, and then go back. I selected Subway Surfers on my phone. When you come back to the Profiles tab, tap on New Task .
- You ll now be prompted to name it. As it is optional, you can choose to skip it. Finally, tap on the check mark displayed on the screen. In the following Task Edit screen, tap on the plus icon to add an action.
- From the action category list, select Plugin > Secure Task > Secure Settings.
- In the Action Edit page that follows, tap on the edit icon against Configuration . The icon will be shaped as a pencil. You may get a warning after this. Ignore it and tap on OK to continue.
- You ll now land on the configuration page for SecureTask. Here, change the Action to Write . Now input New value as 0 and type the following in Setting :
global heads_up_notifications_enabled
- When you save this, go back to the main screen of Tasker, and under the Profiles tab, long press on the text written on the right-hand side of the green arrow. From the menu that appears, tap on Add Exit Task . Again, you can choose to name this task and then tap on the check mark.
- Now, similar to the previous steps, tap on the plus icon to add an action, go to Plugin > Secure Task > Secure Settings. While editing configuration, again change Action to Write , and enter the same value as above in Setting . The only change in this step is to enter the New value as 1 instead of 0 . Save this before finally going back to the main screen of Tasker.
Now, the heads-up notifications will be immediately banned the next time you launch any of these apps (in my instance, it would be Subway Surfers). And they’ll be activated once more after you quit the programme. By pressing on the list of current apps under the created profile, you can add or remove any apps from this list at any time.
SEE ALSO: iOS 10: How to Group Notifications by App
Disable Heads Up Notifications to Play Games and Watch Videos Conveniently
It only makes sense to block them given how annoying it may be to receive notifications when playing a game or viewing a movie. However, the only choice you’ll see in your phone’s settings is to entirely disable them for all apps. But now that you’ve read this post, you’re able to ban them for any specific app you choose. Do you know of any methods that are simpler than the one listed above? Please share your feedback in the space provided below.
This guide was initially published on XDA Developers. We put it to the test, and it functions flawlessly.