Skip to content

Getting Started with a Launcher.JSON

Launcher Setup

The most streamlined method for configuring a fleet of devices for BlueFletch Enterprise, or for updating any number of those devices simultaneously, is through the BlueFletch Portal website and Playbook Agent application. The launcher.json file can be written in an editor wizard on the Portal. Detailed directions for the process can be found here. However, there may come be some instance when you need to manually write the launcher.json file and install the JSON and Launcher application directly onto a device, for which we have provided the following guide.

Build Configuration

To start, you need a launcher.json file. Using the BlueFletch Portal, this can be easily generated. The Portal will pre-fill the current license key and organization ID; if creating the launcher.json manually, the license key and organization ID can be found on the Organization page of the Portal, within the Admin tab.

There is an example configuration in the Configurations documentation and another one at the bottom of this page.

Setup the License Key

Retrieve your license key from the BlueFletch Portal, or ask your BlueFletch contact for it, and place it in the configuration file as follows:

{
  "configVersion" : "2020-01-01-start",
  "license" : "paste license key here",
  ...
}

It is suggested that the configVersion is updated each time the configuration file is touched. This field is for reference only.

Laying out Homescreens

Applications

To assign applications to display in specific groups, identify the groups that will be returned from your Identity Provider. In the example below, we expect to get both Supervisor and Associates as the named groups. Set up these user groups in the layout fields. To add a package to a group, add a JSON object with the package field.

...
"layouts" : {
   "Supervisor": [
      { "package" : "com.bluefletch.ems.support" },
      { "package" : "com.android.calculator2" }
    ],
    "Associates" : [ ... ],
    "*" : [ ... ]
},
...

In the above example:

  • Supervisors will see the two apps from the 'Supervisor' array.
  • Associates will see apps from 'Associates' array only.
  • Non logged-in users will see the apps in the '*' or open zone section.

For the complete syntax of an application object, click here.

Web Shortcuts

To specify a website shortcut, add a JSON object that defines a label and url, and any optional values as desired, inside of a layout:

...
"layouts" : {
   "Supervisor": [
      {
        "label" : "BlueFletch Web",
        "url" : "https://bluefletch.com",
        "icon" : "/sdcard/DCIM/icons/bluefletch_logo.png"
      }
    ],
    "Associates" : [ ... ],
    "*" : [ ... ]
},
...

For the complete syntax of a web shortcut object, click here.

Folders

To create a folder, you will need to specify the label and the contents, which will contain the different apps in the folder. You can use the same syntax for the application object inside the contents of the folder. This example puts some Supervisor applications inside "App Folder":

...
"layouts" : {
   "Supervisor": [
      {
        "label" : "App Folder",
        "contents" : [
          { "package" : "com.bluefletch.ems.support" },
          { "package" : "com.android.calculator2" },
          { "label" : "BlueFletch Web", "url" : "https://bluefletch.com",
            "icon" : "/sdcard/DCIM/icons/bluefletch_logo.png"
          }
        ]
      },
      { "package" : "com.google.calendar" }
    ],
    "Associates" : [ ... ],
    "*" : [ ... ]
},
...


For the complete syntax of a folder object, click here.

Install Configuration

Copy the launcher.json file to the following location:

/sdcard/Download/ems/launcher.json

Launcher will pick this file up and copy it to:

/sdcard/Android/data/com.bluefletch.launcher/files/blueLauncher/launcher.json

Additionally the Launcher will monitor for any changes to these locations and reapply to the application.

Install Application

Download the Launcher APK from the BlueFletch Portal Downloads page, and install the APK via your MDM or sideload via ADB.

adb install ./launcher.apk

The package com.bluefletch.launcher will be installed.

It is suggested that Permissions be granted prior to launching the application.

Permissions via ADB

adb shell pm grant com.bluefletch.launcher android.permission.READ_PHONE_STATE
adb shell pm grant com.bluefletch.launcher android.permission.RECEIVE_BOOT_COMPLETED
adb shell pm grant com.bluefletch.launcher android.permission.READ_EXTERNAL_STORAGE
adb shell pm grant com.bluefletch.launcher android.permission.WRITE_EXTERNAL_STORAGE
adb shell pm grant com.bluefletch.launcher android.permission.ACCESS_NETWORK_STATE
adb shell pm grant com.bluefletch.launcher android.permission.ACCESS_FINE_LOCATION
adb shell pm grant com.bluefletch.launcher android.permission.INTERNET
adb shell pm grant com.bluefletch.launcher android.permission.NFC
adb shell pm grant com.bluefletch.launcher android.permission.SYSTEM_ALERT_WINDOW

Permission via SOTI

afw_set_permission_grant_state com.bluefletch.launcher android.permission.READ_PHONE_STATE allow
afw_set_permission_grant_state com.bluefletch.launcher android.permission.RECEIVE_BOOT_COMPLETED allow
afw_set_permission_grant_state com.bluefletch.launcher android.permission.READ_EXTERNAL_STORAGE allow
afw_set_permission_grant_state com.bluefletch.launcher android.permission.WRITE_EXTERNAL_STORAGE allow
afw_set_permission_grant_state com.bluefletch.launcher android.permission.ACCESS_NETWORK_STATE allow
afw_set_permission_grant_state com.bluefletch.launcher android.permission.ACCESS_FINE_LOCATION allow
afw_set_permission_grant_state com.bluefletch.launcher android.permission.INTERNET allow
afw_set_permission_grant_state com.bluefletch.launcher android.permission.NFC allow
afw_set_permission_grant_state com.bluefletch.launcher android.permission.SYSTEM_ALERT_WINDOW allow

Start Launcher

To start, use com.bluefletch.launcher.Launcher

Example ADB Command

adb shell am start -n com.bluefletch.launcher/com.bluefletch.launcher.Launcher

Example AirWatch Command

mode=explicit,action=android.action.intent.MAIN,package=com.bluefletch.launcher,class=com.bluefletch.launcher.Launcher,broadcast=false

On first execution, the Enterprise Launcher APK will set itself as the default launcher and reboot the device.

Example Configuration

{
    "configVersion" : "2019.12.20.1",
    "license":"license here.",
    "layouts" : {
        "Supervisor":[
            {
                "package" : "com.symbol.wfc.pttpro"
            },
            {
                "package": "com.bluefletch.ems.deviceinformation"
            },
            {
                "label" : "Vision Settings",
                "package": "com.bluefletch.ems.vision",
                "activity": "PreferenceActivity"
            },
            {
                "label" : "Vision Training",
                "package": "com.bluefletch.ems.vision",
                "activity": "FaceTrainActivity"
            },
            {
                "label" : "Tools",
                "contents":[
                    {
                        "package":"com.bluefletch.acc.themerapp"
                    },
                    {
                        "package" : "com.bluefletch.ems.support"
                    },
                    {
                        "package" : "com.symbol.datawedge"
                    },
                    {
                        "package" : "com.symbol.tool.stagenow"
                    },
                    {
                        "package": "com.bluefletch.go"
                    }
                ]
            }
        ],

        "Associates":[
            {
                "package" : "com.symbol.wfc.pttpro"
            },
            {
                "label" : "Vision Training",
                "package": "com.bluefletch.ems.vision",
                "activity": "FaceTrainActivity"
            },
            {
                "package": "com.bluefletch.ems.support"
            },
            {
                "package": "com.android.calculator2"
            },
            {
                "package": "com.bluefletch.ems.deviceinformation"
            }
        ],
        "*": [
            {
                "label" : "BlueFletch",
                "url" : "https://bluefletch.com",
                "icon" : "/sdcard/DCIM/icons/bluefletch_logo.png"
            },
            {
                "package": "com.android.calculator2"
            },
            {
                "package" : "com.bluefletch.ems.support"
            },
            {
                "label" : "Tools",
                "contents":[
                    {
                        "package":"com.bluefletch.acc.themerapp"
                    },
                    {
                        "package" : "com.symbol.datawedge"
                    },
                    {
                        "package" : "com.symbol.tool.stagenow"
                    },
                    {
                        "package": "com.koushikdutta.vysor"
                    }
                ]
            }
        ]
    },
    "settings": {
        "idleTimeInMinutes": 120,
        "maxSessionTimeInMinutes": 480
    },
    "emsSupportTool" : {
        "orgId":"organization_id_here"
    }
}