Android Plus JavaScript Scripts
Execute more versatile scripts on your Android devices with JavaScript scripts. JavaScript scripts significantly enhance your ability to configure your Android devices by supporting all standard JavaScript language features, including conditional statements, loops, functions, and variables.
JavaScript scripts are supported on all Android Plus devices and use the same mechanisms to target devices as legacy scripts. They are available anywhere you can send scripts, including within rules and profile configurations.
// Enter administrator mode if the device name starts with ‘Headquarters’
if (mobicontrol.device.name.startsWith('Headquarters')) {
mobicontrol.agent.enterAdminMode();
}
#!/usr/bin/env js
to ensure the Android device agent recognizes the script as a JavaScript script.#!/usr/bin/env js
// Enter administrator mode if the device name starts with ‘Headquarters’
if (mobicontrol.device.name.startsWith('Headquarters')) {
mobicontrol.agent.enterAdminMode();
}
See JavaScript Samples for some sample scripts that you can adapt for your organization.
Training on the Android Scripting Engine is available at SOTI Learning Academy which is accessible to customers with an active Premium or Enterprise Support entitlement. If you do not have access or would like to gain access, contact your Account Representative.