Android O is looking to bring major enhancements to the Android OS we all know and love. Picture-in-picture mode for phones, notification channels, smart text selection, autofill services, and under the hood many, many changes to enhance your battery life, performance, and security. One feature that is supposed to help users sort out issues with battery life and performance is background process limitations. Without going into too much detail, apps in Android O can no longer be woken from their manifest-registered implicit broadcast receivers and they can no longer start background services without going through JobScheduler. If an app wants to start a background service, it must explicitly tell the user that it is doing so by posting a notification. However, when an app is running in the background, Android O now seemingly tacks on another persistent notification telling you what apps are running. This also occurs when an app with the SYSTEM_ALERT_WINDOW permission (such as the popular Twilight app) is currently displaying an overlay.
Although these notifications are minimized by default, they cannot be dismissed by the user or permanently blocked in Settings. This behavior is very annoying to many users, and I seriously hope that Google gives us a way to disable this notification in the final Android O/Android 8.0 release. However, if they do not, there is still a way to permanently hide the persistent background apps notification. I will showcase how to do so in a step-by-step guide, followed by an explanation of how it works as well as important caveats.
Hide the Persistent Notification in Android O
- Install the USB drivers for your particular phone if you’re on Windows (they can be found here).
- Download the ADB binary for your particular operating system (Windows, Mac, Linux). These links will always point to the latest version of the binary, so you don’t have to scour the net looking for the latest one.
- Extract the contents of the ZIP file you downloaded into an easily accessible folder on your PC (such as in the Downloads folder).
- Go to the Settings app on your phone and tap on the “About Phone” option.
- Find the Build Number and tap on it 7 times to enable Developer Mode. You’ll see a popup once it’s enabled.
- Go back to the Settings main menu and enter Developer Options so you can enable USB Debugging Mode.
- Plug your phone in to the PC and swipe down your notification panel to change the USB mode from “charge only” to “file transfer (MTP)” mode. This may not be necessary for your phone.
- On your PC, browse to the directory where you extracted the ADB binary.
- Launch a Command Prompt/Terminal in this ADB directory. For Windows users, this can be done by a Shift+Right-click then selecting the “open command prompt here” option.
- Once you’re in the Command Prompt or Terminal environment, enter the following command:
- This will start the ADB daemon. If this is your first time running ADB, you will also see a prompt on your phone asking you to authorize a connection.
- Now re-run the adb devices command from step 10, and the command prompt/terminal will print the serial number of your device. If it does, then you’re ready to move on. If not, then the USB drivers are likely not installed properly.
- Go back to the Command Prompt and enter the following command:
- Now execute the following command:
cmd appops set android POST_NOTIFICATION ignore
- You won’t get a success message or anything, but as long as you don’t see an error it should have worked. Now just reboot your phone!
Yes, I realize these are pictures of a phone screen rather than screenshots. I don’t have an Android O compatible device myself, so I asked TK to send me images.
- If you want to revert this command, enter this into the command prompt:
cmd appops set android POST_NOTIFICATION allow
The post How to Hide the Persistent Notification for Background Apps in Android O appeared first on Android News.