Using Custom Attribute in a lockdown configuration

Solved

Hello

I am trying to use a custom attribute in a lockdown configuration

To launch a custom application according to the custom Attribute in which i configure a different application package. 

Here is my lockdown configuration using Launch://%CustomAttr:Appname%  : 

Custom Attribute is defined and is sent to the device. 

But when I change the Custom Attribute, the lockdown is not updated. It stays configured with the Custom Attribute distributed the first time. 

Thank you for your help

2 years ago
SOTI MobiControl
ANSWERS
AW
Adam Williams
2 years ago

Hi Nicolas,

I have replicated your situation myside and confirm the behaviour that for some reason the lockdown gets the first Custom Attribute and doesnt update even after lockdown refresh once device is moved group.

I have however found a work around to this, though I am not entirely sure why the lockdown menu item approach does not work

Instead of your menu item being Launch %CustomAttr:Test%

Swap this for Custom script:///sdcard/StartApp.cmd

Then create StartApp.cmd file in a text editor, its contents would be:

start %CustomAttr:Appname%


Deploy this file to the devices and locate at /sdcard/

Thanks
Adam

Solution
N
NicolasM
2 years ago

Hello Adam

Thank you, your solution is working. 

I also had to add the different bundle ids hidden in the lockdown so they are authorized to be launched by the script. 

RC
Raymond Chan Diamond Contributor
2 years ago

When value of a custom attribute has been made with the web-console at the MobiControl side, it is common that there is some time delay  before the new values get sent to the related device(s).   Such time delay can vary quite widely depending on many factors in a particular implementation, for examples, the number of devices affected, server CPU/network loading & scheduling, connection quality, heart-beat schedule, device model/firmware, device agent version, etc. 

Also, after the new value has reached a particular device, the lockdown menu already shown on the device screen may not be IMMEDIATELY redrawn using the new value unless manually enforced properly by extra script(s) based on particular implementation/device-model. 

N
NicolasM
2 years ago

Thank you for your quick answer.

What would be the way to enforce the lockdown redraw?

I tried forcing check in, rebooting, but it doesn't force it. 

AW
Adam Williams
2 years ago

Hi Nicholas,

Could you share what examples of AppSES could be and outline (ven roughlyl) the difference in the application packages?

Just so I can understand a little more the use case.

Thanks
Adam

N
NicolasM
2 years ago

Hello Adam

AppSES contains a packagename to be linked to the lockdown menu. 

It is different depending on my device groups custom attribute configuration. 

I am willing to use the custom attribute, to be able to have the same lockdown across my groups, but with this custom attribute AppSES linking to 2 different apps depending on the group the devices are in. 

Thanks for your help

RC
Raymond Chan Diamond Contributor
2 years ago

Nicolas,

If you have rebooted the device, the lockdown menu must have already been redrawn.  So, if the lockdown menu screen is still drawn based on old custom attribute value, it is likely that your new custom attribute value has not actually reached the device yet.  Have you done any test to confirm this?

N
NicolasM
2 years ago

Raymond

I verified that the customAttribute was updated on the device by showing it with command 

showmessagebox %CustomAttr:AppSES%
 
It is updated, but the lockdown link doesn't update, even after 2 hours. 
 
 
RC
Raymond Chan Diamond Contributor
2 years ago

Is the value of AppSES just the bundle ID of an app?

Are you using the MobiControl "standard" (i.e. without any of your own customization) static or "standard dynamic" html template for your current lockdown menu?

What are the version and build numbers of your MobiControl server and agent?

Frankly speaking, I have previously used custom attributes successfully for many many different objects/elements in the html template or kiosk item parameters such as  file-path, URL, intent parameters, etc.  but never for bundle-ID, which indirectly affects some kind of application-run-control whitelist for relevant kiosk items.     I have to do some tests to see if there are any tricks when using it to replace the whole or part of an app bundle-ID.

N
NicolasM
2 years ago

Thanks for your help Raymond

We use the Mobicontrol standard html template with our customizations. 

Server is 15.5.2 build and agent version is 15.4.3.1054

For test purpose, I also tested using %DEVICENAME% macro as display name for an item in my lockdown.
And changed the devicename to see if it's updating. It does not update either. 

RC
Raymond Chan Diamond Contributor
2 years ago

Please clarify if you are using the html template with filename "DynamicAndroidLockdownTemplate.html"?

Or the one wth filename "MCTemplateAndroidDesktop.html"?   

N
NicolasM
2 years ago

I do not use the "DynamicAndroidLockdownTemplate.html"

I use a custom MCTemplateAndroidDesktop.html

RC
Raymond Chan Diamond Contributor
2 years ago

If you use static template " MCTemplateAndroidDesktop.html" and cannot get %DEVICENAME%" change to work in your test, the problem can likely be related to how you use the macro (syntax, configuration, s/w compatibility, etc.) or how you do your test. Let's focus on the simpler device-name macro first before handling the App package macro.

Instead of putting the %DEVICENAME% macro in the nth "DISPLAY NAME" field, open your customized html file and replace the string <MCDISPn> with  "%DEVICENAME%".  Redo your test to see if it works or not.  After making any change to the device name, and confirm that the new value has been sent to the device (e.g. with your "showmessagebox script test), you have to force the lockdown to be redrawn by either one of the following:

1. reboot the device;

2. revoke the profile consisting of the lockdown menu payload and re-deploy;

3. run a single three-line legacy script to turn off the kiosk, wait a few seconds and turn on the kiosk again.

MD
Matt Dermody Diamond Contributor
2 years ago

Usage of Custom Attributes in the lockdown to dynamically resolve a different bundle ID depending on what is present on the device is a creative, but arguably complex solution to this particular problem. If I were designing for this scenario I would probably use different Lockdown profiles and then assign them based on the criteria of the given bundle ID being installed on the device. The respective Lockdown would be installed based on the presence of the installed app. 

RC
Raymond Chan Diamond Contributor
2 years ago

I totally agreed with Matt's comments in his last post.   Those are some of the reasons why my company haven't used custom-attribute for dynamic configuration of app bundle-ID in the last ten years or so.   The unpredictable time delay for custom attribute value to reach the device due to various uncontrollable factors, and the need for reliable timely mechanism to enforce lockdown menu re-rendering are also concerns in terms of users' UI experience.

A
AMMOD@SOTI
2 years ago

Hi Nicolas,

Thanks for posting on SOTI Pulse, Thanks Matt, Ramond, and John for responding to the post, your expertise and willingness to help are greatly appreciated.

I'm glad that you've found the solution to your query.

If you have any additional questions or concerns, please don't hesitate to reach out. We're dedicated to providing assistance and support.

Kindly let us know.

Kind regards,

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

Similar Discussions