Creating a text with device name in it
Thank you for your post, please provide details of how are you going to integrate your application with MobiControl?
If you require DeviceName from MobiControl, you can consider accessing via RESTApi.
Looking forward for your response.
Technical Support | SOTI Inc. |1.905.624.9828 | email@example.com | www.soti.net |
Thank you for the suggestion.
I haven't used RESTApi feature before. Will this create on all devices some sort of local file which will be accessible by 3rd party app in order to read it's contents? At least readable as a text file?
Because our in-house built app has a launcher that replaces/covers entire screen. It does not work well with SOTI Kiosk, it creates a conflict and devices has a black screen. For this reason I've only used a SOTI lockdown features. When this app is running, there is no way to actually access SOTI or other android settings on device. Unless I send "kill" the app via mxconfig command. Other features as remote control, lockdown restrictions work fine.
It's not ideal solution but we are moving with direction of our app as an android launcher. Only minus that I've seen, at the moment, is that we can't get device name to appear on the screen. Because devs need a source of device name in order to show in our app.
We're trying to find a similar solution. I am thinking of trying to do a script that would create a file on each device with the device name as the file name. Like "AssetTag.json". Not sure if this will work but worth a try.
Update: I have had success so far with creating a file sync rule that moves a blank dummy file "Name.devname" to the device and then run a script afterwards that renames it to %devicename%.devname. The file then has the device name as it's name, and we can reference it in third party apps.
That is a good idea I'll test it also on my end and see how it goes.
EDIT: On my end I can't even copy to a new destination folder inside of device, let alone rename some folder/file. How did you managed to do it?
SOTI logs show that my script has been sent to device, no errors, but nothing happens on the device.
I am doing it with a file sync rule. Just downloading a local file on my server to %sdcard%/download/ on my Androids, but other directories should work too like /data/tmp/public.
The file is name.devname (fake file) but after copying the file it renames it. Just go to the advanced tab of your file sync rule and click on scripts. Then in the "after file sync execute script" box I put in:
copy /sdcard/Download/Name.devname /sdcard/Download/%devicename%.devname
This copies the fakefile and renames it to have the device name. Not sure how useful this is, but we are able to reference that file by other programs since no other file with extension .devname exists. If you find a better workaround, you should post it!
I see, you've package the script as part of sync rule.
What I was trying to do, is to test that by sending script via "Legacy" mode. Which had no effect. I'll give it a go on my TC-57 and see how it goes.
Thank you for the help
UPDATE: This also works on our end, I've made it work as part of package deployment. Thank you for the solution