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

  1. Make sure you are signed into MobiLock Dashboard.
  2. You have set up Android for Work and have some Play For Work applications.
  3. 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.

  1. Sign In to MobiLock Dashboard.
  2. Navigate to Devices tab.
  3. Click on the 3 dots menu and select Set Custom Fields as shown below,
  4. You would see a dialog as shown below. This dialog has two options,
    1. Field Name - You can use this section to create custom fields.
    2. Field Values - For each of the values that you have defined, you can set values for each enrolled device.
  5. Click on ADD MORE FIELD to add a new field as shown below. Once you enter a field name click SAVE.
  6. You can add a maximum of ten (10) custom fields. For example here is how it looks after I have created 3 fields.
  7. To set values for these newly created custom field, click on the Field Values tab and click DOWNLOAD CSV,
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. 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.

  1. In this step we will see how to use the email and username custom fields that we created above in Step - 1 > 6.
  2. In MobiLock Dashboard navigate to Enterprise > My Apps > PLAY FOR WORK APPS,
  3. Click on Gmail to see the extended settings panel.
  4. In the Extended settings panel, click on App Configurations tab,
  5. Click on CREATE to create a new configuration. You will be shown a configuration dialog.
  6. Give the configuration a name and here in the fields for email and username use $ and $device.username respectively,
  7. Click on SAVE to save the configuration. Once saved it will appear under App Configurations as shown below.
  8. Now you can publish this configurations to your Device Profiles & Devices where you have installed GMail application from Play for Work.
You can use the custom fields as wild-cards for configurations of any Play for Work application. For example you can use it configure Whitelist Websites in Chrome, or use it to specify Device specific Dropbox token, or use it specify Outlook client configuration etc.

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.

  1. We will use the defaulturl field created in Step-1 > 6 above.
  2. In MobiLock Dashboard, navigate to Device Management > Device Profile and start creating or editing a profile.
  3. Navigate to OPTIONAL SETTINGS tab and click on SINGLE APP MODE section.
  4. If you select MobiLock Browser as the default app, then you will be shown the following options,
  5. 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,
  6. 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,
    1. For all the devices where the value for the field defaulturl is set on Dashboard, they will use this URL as the launch URL.
    2. 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.

How did we do?