Community - SOTI MobiControl

Community - SOTI MobiControl

There's a new home for Articles. Find Articles on Our Product Support Page.

SOTI MobiControl Discussions


  • 0 votes 11 answers

    Download a data file (.csv) using javascript Solved

    Hi all, we have the problem, that we need to change an ini file and put in an number that is related to the device name. We use Zebra TC21 and MC33xx with Android 10 an 11. For the translation from device name into the number we would download an csv file with both values and read the values. Most of the script works, at the moment we are stuck in downloading a file. On the web are a lot of descriptions, but i did not find one that works. Is someone out there who has an idea to that? Best regardsJürgen

    Android Scripting
    2 years ago
  • 0 votes 6 answers

    FileSync Script launch .js file

    Hi, I have FileSync Rule (AE Managed Device) that is uploading multiple files to the devices. One of the file is .js and I would like to execute it if if any of the files changes but I don't know how. Only option that comes to my mind is to copy whole script to the FileSync rule script box but I would rather not as it could change in the future and it could lead to mess. The script itself is not created as (function(root).. , it begins simply with "try {.." so I'm not sure if I could load it with "require" and if yes how to launch it as whole script/file I will be glad for any suggestions

    Android Scripting
    3 years ago
  • 4 votes 7 answers

    Trigger StageNow with MobiControl JavaScript

    I am looking for a way to trigger StageNow on a Zebra MC9300 to consume an XML.  I would like to do this with JavaScript because I need to edit the XML with device data before I consume the file. The only way I currently know how to trigger the device to consume the XML file is with a legacy script but really don't want to have to run 2 different scripts to edit and consume the file. Thanks in advance.

    Android Scripting
    3 years ago
  • 0 votes 5 answers

    API sendscript (Javascript) Solved

    Hi all, is there someone who can tell me if or how it's possible to sende javascript via the "sendscript" api call? Legacy script is working fine but i have a javascript which would be nice to do via api and scfript instead of the console. Ok, found it now myself, there's an parameter available named "ScriptType" which does the trick. @Soti, may i request fully API documentation regarding possible parameters for example the "​/devices​/{deviceId}​/actions" Part (and maybe others too)? It's really bad doing trial and error.

    SOTI MobiControl
    3 years ago
  • 1 votes 2 answers

    Write a value into existing INI file Solved

    Hi, does anyone know a way/script to write into an existing ini file? I tried several things regarding javascript but i'm not familar with javascript, so i don't know where the Problem is. The file is located in the /sdcard/ folder and we are working with 15.5.1 and the latest agent versions.

    Android Scripting
    3 years ago
  • 0 votes 12 answers

    JavaScript "installSystemUpdate(systemUpdateFile)" how to use in script.

    I have tested this command but it did not work. How is the correct syntax for this command? Thank you for your help

    Android Scripting
    3 years ago
  • 0 votes 3 answers

    JavaScript | Set Preferred APN on Android Enterprise

    In the release notes for Android Enterprise Agent 15.2.0, it says that there is now the ability to 'Install, uninstall and set/get preferred Access Point Names (APN) on Android Classic and Android Enterprise Work Managed' Does anyone have any instructions on how to do this? In the past we have used the APN profile configuration, but this seems to fail more often than it works these days. https://docs.soti.net/soti-mobicontrol/android-agent/release-notes/152/android-enterprise-agent-maintenance-releases/

    Android Scripting
    3 years ago
  • 1 votes 3 answers

    Using Android Agent JavaScript API in Lockdown? Solved

    Hello, Is it possible to use the Android Agent JavaScript API (https://www.soti.net/mc/help/javascriptapi/en/mobicontrol.os.html) in the lockdown template? If so, do I need to import certain modules? I attempted to use some of the APIs but couldn't get them to work. Device Information Model: Zebra TC21 Mobi Agent: 15.1.5.1049 OS: Android 10 Thanks, John

    SOTI MobiControl
    3 years ago
  • 0 votes 2 answers

    JavaScript for Android+ Devices

    I am writing some scripts with the help of the SOTI Android Agent JavaScript API Reference.  With the help of the examples in the documentation I have always reached my target. Only with the commands "mobicontrol.network.IpAddress" or "mobicontrol.network.Network" I did not be able to read the data. Is there a simple example how this works?Thank you

    Android Scripting
    4 years ago
  • 0 votes 3 answers

    Script to rename Android Enterprise devices

    I am looking for a way to rename a device with a user specified name.  I would like to prompt the user for the asset number and then use that in the device name.  I got that information with a Java script: var file = new mobicontrol.io.File('/sdcard/asset.txt'); mobicontrol.message.createTextPromptDialog('What is the asset tag number?').withCallback(onOk).show(); function onOk(result) { if (result.inputText != null) { file.writeText(result.inputText); } } But when I try to use that information to rename the device I get an error saying Set isn't a valid command: set myVar=TXT:/sdcard/asset.txt?LN=1 devrename %myVar% Is there a way to either do this all in 1 Java script command?  Or is there a way to set the variable from the legacy script?

    MobiControl - Android Script Engine
    4 years ago
  • 0 votes 9 answers

    How to read an attribute using JavaScript

    Hello, is there a way to read values from Mobicontrol using JavaScript, please? A user wants to somehow enter an IP address, which will be copied to xml file by JavaScript. The ways to enter it: Example 1 - User creates a custom atrribute %NEW_IP% and fills it with IP 10.11.12.13Example 2 - User creates a device name e.g. ABC_10.11.12.13Example 3 - ... other ways? Many ThanksRegards Zdenek

    Android Scripting
    4 years ago
  • 0 votes 1 answer

    How can I run the "Wifireconnect" macro from Javascript

    As I understand the Wifireconnect is a macro for the legacy language of mobicontrol. But is there a way to reference it or use it in javascript instead?      

    Android Scripting
    4 years ago
  • 0 votes 6 answers

    Pin for opening app in lockdown

    Hi, Im migrating devices to new server and thought i could add stage now as a additional backup if need to ask user to scan something, but dont want to just allow access to stage now willy nilly as i dont have certificate for using stage now barcodes.I thought I could add script that before opening asks to enter pin. I can create Java script for that, but as far as I know it cant be added in lockdown icon. Would it be possible to place it in cmd file like legacy script or how to add java script in lockdown icon?

    Android Scripting
    4 years ago
  • 0 votes 2 answers

    How to use new api javascript on lockdown ? Solved Locked

    Hello all, we used mobicontrol on version 14.4 with zebra tc75x under android 7 -> agent version > 14 enrolled android + i've try to play with the new api javascript in the lockdown but until now i can't ... I've try to display alert -> mobicontrol.message.createInfoDialog() ... On lockdown add tag <script></script> add on the body tag -> onload="displayDialog()" re start device but nothing .. Someone call tell me for example how to start with the new api in lockdown ? thanks

    Android
    4 years ago
  • 0 votes 5 answers

    Questions about Java Scripting On android devices Solved Locked

    I am fairly new to Java but I know enough to see what a javascript is doing and how to manipulate it to do what I need to get done. I would like to convert some of my legacy scripts to Java because they are a bit more robust and give me a few more options. Here is an example  of one of my legacy scripts  var MyApp = 'com.test.mobile'; var location = 'some.location'   kill_application %MyApp% sendintent -a "test.AppConfig://Config?BaseAddress=http://%location%:8080/testingapp&SystemName=TestApi&DeviceId=%MCDEVICENAME%&PinUsername=True&PinPassword=True"   My question is how do I use Java to send mobicontrol commands like "sendintent" or "kill_application". Is it possible to call and set mobicontrol variables like in the previous example?  

    Android Scripting
    5 years ago

Top 3 Contributors of The Week

View All

Earn Contributor Badge

More info
  • Diamond
    Diamond New

    Top-tier experts who are delivering outstanding content. Should have more than 7000 points.

  • Platinum
    Platinum

    Experts who are consistent with great content. Should have more than 1000 points.

  • Gold
    Gold

    Highly experienced members with valuable inputs. Should have more than 700 points.

  • Silver
    Silver

    Beginners taking the initiative. Should have more than 500 points.

  • Bronze
    Bronze New

    New contributors starting their journey. Should have more than 250 points.