Purpose
SureMDM administrators may require certain applications to always run in full-screen mode and prevent users from accessing Picture-in-Picture (PiP) mode for security, compliance, or usability reasons. This requirement can be fulfilled using the Run Script command in SureMDM, which allows administrators to enable or disable PiP permissions for specific applications as needed.
Prerequisites
- Devices must be Platform-Signed or enrolled in Device Owner mode
- Access to the SureMDM Console with permissions to create and deploy Run Script jobs
- The target application package name must be known and installed on the device
Steps
- Log in to the SureMDM Console
- Navigate to Jobs → New Job → Android → Run Script
- Enter a Job Name
- Add the appropriate script based on the requirement
To Disable PiP
!#suremdm
allowSpecialPermissions(false,package_name,67)
To Enable PiP
!#suremdm
allowSpecialPermissions(true,package_name,67)
Example
To disable PiP for Google Maps:
!#suremdm
allowSpecialPermissions(false,com.google.android.apps.maps,67)
- Save and deploy the job to the required device(s)
Conclusion
Using the Run Script feature in SureMDM provides administrators with precise control over application behavior by managing PiP permissions at the system level. This ensures applications remain in full-screen mode when required, enhances security, supports compliance policies, and delivers a consistent user experience across managed devices.
Need more help? Here’s how to get help from our experts.