Local Script Execution at Device Startup

SS
Stefan Svensson
Volvo Construction Equipment AB

Hi,
Is there a way to run a script locally on the device at boot or startup?

More specifically, I would like to run a script that toggles Data Roaming on (if it is not already enabled) every time the device starts up. This serves as a safeguard to ensure that Data Roaming is always enabled, as our app requires it to maintain an internet connection. The script should run locally on the device without needing an internet connection, similar to the boot-up procedure that allows our kiosk app to start automatically on device reboot. 

We are using Samsung Android devices with OS versions 13, 14, and 15.


Thanks for your help in advance,
Stefan

27 days ago
Android
ANSWERS
RS
Robert Schäfer
27 days ago (edited 27 days ago)

Hi Stefen,

Couple of options specifically around roaming:

  1. Force data roaming on through feature control.
  2. Force data roaming on through KSP

In answer to your question whether you can run scripts on boot however, as im guessing you know about the above and just want an extra safeguard as you stated:

  • Use a task scheduler and the "On device reboot" frequency setting run any script you want after the device reboots, as per this documentation. This did only become available in a certain MobiControl version, 2024.1 onwards definitely has it implemented.

I was quite confident there was a script for enabling roaming but i've forgotton and i can't find anything on it. Perhaps its possible via writeprivateprofstring DeviceFeature but you may have to check with SOTI on that unless someone else here knows what it is.

RS
Rafael Schäfer
24 days ago

But afaik, only legacy scripts work for local execution.

Every JS needs to have a Server connection or did it change?

N
NSMOD@soti.net
22 days ago

Hi Stefan,

Thanks for posting on SOTI Pulse, Thanks Rafael and Robert for responding to the post, your expertise and willingness to help are greatly appreciated!

Kindly let me know if the solution provided resolved your issue. If not please feel free to reach out.

Thank you for choosing SOTI.

 Regards,

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net

SS
Stefan Svensson
21 days ago

Thanks, Robert and Rafael, appreciate the support! We are currently trying out a legacy script that we trigger on device boot. So far, it looks promising. This is indeed intended as a safeguard, and we already have Roaming enabled through KSP and feature control.

N
NSMOD@soti.net
7 days ago

Hi Stefan,

Happy to hear, that your issue is resolved. Kindly mark it as solutioned.

If you have any questions, feel free to reach out.

Thank you for choosing SOTI.

 Regards,

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net