Icon to the lock screen using a command

Solved
M
Mathieu
Metro Inc.

Hello !

I want to have an icon on the desktop that allows the user to clear the cache of SOTI Surf. 

Is it possible to add an icon to the lock screen using the command "sendinfo net.soti.action.surf clearcache"

My device is an Zebra MC93 Android 11 and i use Enterprise Home Screen for lock down.

Any help would be greatly appreciated.

Thanks 

Mat

2 years ago
Android
ANSWERS
MD
Matt Dermody Diamond Contributor
2 years ago

Yes you can place a script file onto the device containing any script and then link to it in you lockdown so the user can launch it on command. Here is an article describing the process. Note that the article mentions using a .bat file. I always have used a .cmd file for this process and it has always worked for me that way. I'm not sure about the .bat file. 

https://discussions.soti.net/articles/device-initiated-script-actions-in-lockdown-mode

Note this does require you to switch from the EHS to the SOTI lockdown. You won't be able to link to a SOTI script from within EHS.

Solution
M
Mathieu
2 years ago

thanks for the information !!

7
74HCT04
2 years ago

I appreciate that the OP is specifically requesting advice for a script of legacy syntax, but future readers may wish to know that the article Matt has linked also works with Javascript.

Save the file with a .js extension, get it on the device's filesystem (e.g. with a file sync rule) and make sure you include the shebang on the first line of your Javascript  as per

https://www.soti.net/mc/help/v15.5/en/console/other/androidplus_javascript.html

An example lockdown item could then be 

script:///sdcard/Example.js


Example.js example contents:

#!/usr/bin/env js
mobicontrol.log.info(mobicontrol.device.serialNumber);



MD
Matt Dermody Diamond Contributor
2 years ago

Great tip!