Get console device details from lockdown app

SA
Sterling Albury
Spire Health

Hello,

I'm wondering if there is a good way to query the EMM device details from an Android app in lockdown mode. For example, we would like our Android app, that is launched in lockdown mode, to get the device id, found in the device details in the console, and send it to our backend. I haven't found any good direct way to get this info from our app. The only idea I came up with was to have a script run during enrollment to create a file on the sdcard card with info and then have our app look for and read from this file to get the data stored. I'm not even sure if it's possible to have the script get the device id or device name, or if there are other issues with this process. I also thought I saw that there was a way to broadcast an intent, and maybe we could broadcast the info we want for our app to pickup and parse..? Maybe there is a way for our backend to query the Soti api's and somehow get the info that way? I'm relatively new to Soti and pretty much still in the evaluation stage, so I'm still feeling my way around the features. Any help or pointing me in the way to find the answers would be greatly appreciated. 

Thanks,

Sterling

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

What goal are you trying to accomplish? Are you trying to solve an asset management problem by somehow matching the devices to an end user? 

SA
Sterling Albury
6 years ago

I think there are a couple of uses for this and can give a couple of examples. One, I think it will help our customer service team identify which device our users are on through our backend dashboard, and can then quickly locate the device in the console. Our user base are mostly elderly and not tech savy, so we don't want them hunting around looking for numbers and whatever on their device. Second, if our app can determine if it's on an MDM device, then we can enable/disable certain features in the app. This is one of the main use cases. There might be some other use cases people here have in mind, but I think these are the main ones.

MD
Matt Dermody Diamond Contributor
6 years ago

SOTI has a built in mechanism called Custom Data whereby you can extract values from .xml or .ini files resident in the device and have them reported as device properties in SOTI. Custom Data can be added to the column view just like any of the natively extracted properties like Serial Number and Mac Address. If you have control over your business application I would suggest saving the end user name or ID to an .xml or .ini file and then use a Custom Data rule to extract that value from the device so that it is reported in SOTI. 

As far as detecting whether the device is managed or not, you may be able to leverage native Android features for checking whether certain policies are applied. For example, you should be able to query whether a lock screen has been set and in Android 10 I think you can even check the complexity of the lock combination. 

SA
Sterling Albury
6 years ago

I'm a little unclear about the Custom Data. It sounds like our business app would create a file, and then Soti would access that file and extract the contents to show in the Soti console. Is that right? Is there a way to go the other direction? Have Soti's DPC create a file, and then our app access and extracts the data to show in our backend?
I'm looking at querying the package manager to see if Soti is installed to determine if the device is managed or not. I have a feeling that this could work fairly well. I'll take a look to see about the policies applied on the device; perhaps that is a more robust way to determine if the device is managed or not.

IS
Ian Stuart
5 years ago

Did you ever find a solution for this?