Enrollment enhancing - disable sound notifications during enrollment - draw over other app permission keeps prompting after enabling setting

Good afternoon

For enhancing our enrollment of devices we looking for a solution for 2 minor problems:

- disable sound during enrollment, in other words set sound of the device to '0' but with the possibility for the user to adjust it again.

- Draw over other apps permission is needed for Xsight, after enabling in settings this keeps prompting in SOTI Mobicontrol-app, this dissapears after rebooting the device but is slowing down enrollment.

Thanks for your advice

Kevin

a year ago
SOTI MobiControl
ANSWERS
A
Aaron
a year ago

The best I could come up with for our devices to disable the sound during enrollment was to create a profile with a scheduled task that sends a JS to the device to set the volume to 0 (which basically sets it to vibrate). The task is only assigned to our enrollment OU and only runs once, so if you change the volume afterwards it will stick to whatever you set it to.

Here's the JS. It reports the current volume settings to the device log, sets the volume to 0, then reports the new volume settings. I did this so we could verify the script was being applied on remote devices, but really all you need is the middle section.

**************
#!/usr/bin/env js
{
    mobicontrol.log.info('Previous volume Settings for Music is: ' + mobicontrol.audio.musicVolume);
    mobicontrol.log.info('Previous volume Settings for Alarm is: ' + mobicontrol.audio.alarmVolume);
    mobicontrol.log.info('Previous volume Settings for Notifications is: ' + mobicontrol.audio.notificationVolume);
    mobicontrol.log.info('Previous volume Settings for Ringer is: ' + mobicontrol.audio.ringVolume);
    mobicontrol.log.info('Previous volume Settings for Voice Calls is: ' + mobicontrol.audio.voiceCallVolume);
}

{
    {
        mobicontrol.audio.setMusicVolume(0.0);
        mobicontrol.audio.setAlarmVolume(0.0);
        mobicontrol.audio.setNotificationVolume(0.0);
        mobicontrol.audio.setRingVolume(0.0);
        mobicontrol.audio.setVoiceCallVolume(0.0);
    }
    {
        mobicontrol.log.info('New volume Settings for Music, Alarm, Notifications, Ring, and Voice Calls is: ' + mobicontrol.audio.notificationVolume);
    }
}


***************


As for your Xsight issue, I'm not sure if this will help with that or not, but in that same profile/schedule task we run an additional script that calls the Mobi permissions so it prompts us to enable all of them. Here's the script for that:

************
request_appops_permission android.permission.WRITE_SETTINGS

request_appops_permission android.permission.PACKAGE_USAGE_STATS

request_appops_permission android.permission.SYSTEM_ALERT_WINDOW

request_appops_permission android.permission.BIND_NOTIFICATION_LISTENER_SERVICE

request_appops_permission android.permission.MANAGE_EXTERNAL_STORAGE


************

KD
Kevin DECLERCQ
a year ago

Hello Aaron

Just let you know I'd appreciate your reply, we didn't have the time/option to test this solutions.

Kind regards

Kevin

C
CKMOD@SOTI Bronze Contributor
a year ago

Hi Kevin,
 
Thanks for posting on SOTI Pulse, Thanks Aaron
for responding to the post, your expertise and willingness to help are greatly appreciated!
 
Have you had an opportunity to test the suggested solutions by Aaron and has it successfully addressed your query?
 
If not, or If you have any additional questions or concerns, please don't hesitate to reach out. We're dedicated to providing assistance and support.