Using Custom Fields as Wildcards
MobiLock Dashboard gives you the ability to define custom fields and set values against them for each device. These custom fields can be used as wildcards when defining configurations for Play For Work applications or used in Device Profile to override the default url.
This document helps you understand on how to define the custom fields, set values for them and then use them for your Play For Work app configurations and specify a device specific custom URL.
Before you Start
- Make sure you are signed into MobiLock Dashboard.
- You have set up Android for Work and have some Play For Work applications.
- Have enrolled at-least one Android device and created one Android Device Profile
Step 1 - Defining & Setting Values for Custom Fields
In this step we will see how to define custom fields and set their values in bulk. These custom fields will be used as wildcards in the subsequent steps.
- Sign In to MobiLock Dashboard.
- Navigate to Devices tab.
- Click on the 3 dots menu and select Set Custom Fields as shown below,
- You would see a dialog as shown below. This dialog has two options,
- Field Name - You can use this section to create custom fields.
- Field Values - For each of the values that you have defined, you can set values for each enrolled device.
- Click on ADD MORE FIELD to add a new field as shown below. Once you enter a field name click SAVE.
- You can add a maximum of ten (10) custom fields. For example here is how it looks after I have created 3 fields.
- To set values for these newly created custom field, click on the Field Values tab and click DOWNLOAD CSV,
- A CSV file will be downloaded to your computer. The downloaded file name will have the "devices_yyyy-mm-dd-xx.csv" pattern. Depending upon the number of devices that you have, it may take longer to download this file.
- Once the file is downloaded, locate the file on your computer and open in an editor that can edit csv files. I have used TextEdit on a Mac as shown below.Do NOT EDIT the first four fields, that is device_name, device_id, IMEI_No, Serial_No. These are used as mappings against device and editing them will corrupt the file.
- You can add or modify the values of custom fields separated by commas as shown. You can choose not to enter values for devices that you don't want to or add only the values required. In the screenshot below I have added all values for FrontDeskTab, CallCentreDevice, but left the device named Joe Root empty and for Store Kentucky device added only the email and defaulturl fields. Once done save the file locally on your computer.
- Now navigate back to the MobiLock Dashboard and upload the file in the dialog shown ate Step 7 above. If the CSV could be read properly and there were no errors, then you would see the following confirmation.
- That's it! You have successfully added new custom fields and set the values for them. You can check those values against the device, by clicking on the device and in the device details page, clicking on the Settings Menu (Gear Icon) > Set Custom Properties
Step 2 - Using Custom fields in Play for Work App configurations
Assuming that you have set up Android for Work account and approved the GMail application to your Play for Work apps. In this step we will see how to create dynamic app-configurations using custom fields.
- In this step we will see how to use the email and username custom fields that we created above in Step - 1 > 6.
- In MobiLock Dashboard navigate to Enterprise > My Apps > PLAY FOR WORK APPS,
- Click on Gmail to see the extended settings panel.
- In the Extended settings panel, click on App Configurations tab,
- Click on CREATE to create a new configuration. You will be shown a configuration dialog.
- Give the configuration a name and here in the fields for email and username use $device.email and $device.username respectively,
- Click on SAVE to save the configuration. Once saved it will appear under App Configurations as shown below.
- Now you can publish this configurations to your Device Profiles & Devices where you have installed GMail application from Play for Work.
Step 3 - Overriding the Default URL using Custom Fields
You might have a business use-case where you are setting up MobiLock as a Kiosk Browser at multiple locations and at each location you want a different URL to be the default URL. With custom fields, instead of creating multiple profiles, you can create one profile with a default URL and then choose a custom field to override that at a device level. This section describes how to achieve it.
- We will use the defaulturl field created in Step-1 > 6 above.
- In MobiLock Dashboard, navigate to Device Management > Device Profile and start creating or editing a profile.
- Navigate to OPTIONAL SETTINGS tab and click on SINGLE APP MODE section.
- If you select MobiLock Browser as the default app, then you will be shown the following options,
- Now you can specify a default launch URL and additionally you can choose to override with a custom field. Select Override With Device Custom Property and choose the property you want to use as shown below,
- Click on UPDATE PROFILE to save the profile. This will send a push to all the devices where this profile is applied and the following can be observed on devices,
- For all the devices where the value for the field defaulturl is set on Dashboard, they will use this URL as the launch URL.
- For all the devices where the value the field defaulturl is NOT set on Dashboard, they will use the default launch URL.
As you can see with the with custom fields, you can make your configurations completely dynamic and use them across devices. Do let us know if you run into any issues while using this feature.