There will be a lot of notifications shown on the device notifications panel by different applications on the Android devices. In order to Hide/Show the notifications on devices for any specific applications below SureMDM run scripts would help achieve the same.
Purpose
The purpose of this knowledge article is to provide a guide on how to Hide or Show notifications on an android device using SureMDM Run Scripts.
Prerequisites
- “Notification Access” should be turned ON for SureMDM Agent in order to hide the non-sticky notifications on non-EA devices and non-KNOX devices.
Steps
Step 1 : Hide Notification
- Run Script for Single Application.
!#suremdm
hideNotifications(<pkg1>)
Example:
!#suremdm
hideNotifications(com.nix)
- Run Script for Multiple Applications :
!#suremdm
hideNotifications(<pkg1>, <pkg2>, <pkg3>, …)
Example :
!#suremdm
hideNotifications(com.nix, com.gears42.surelock)
Note : pkg1, pkg2, pkg3 – refers to the package name of the applications.
Step 2 : Show Notification
- Run script for Single Application :
!#suremdm
showNotifications(<pkg1>)
Example :
!#suremdm
showNotifications(com.nix)
- Run script for Multiple Applications :
!#suremdm
showNotifications(<pkg1>, <pkg2>, <pkg3>, …)
Example :
!#suremdm
showNotifications(com.nix, com.gears42.surelock)
Note : pkg1, pkg2, pkg3 – refers to the package name of the applications.
Need more help? Here’s how to get help from our experts.