Layout Custom Actions

Layout Custom Actions are platform actions that can be surfaced as icons on the Launcher home screen.

Overview

BlueFletch supports Layout Custom Actions that can be used to launch system actions on the Launcher home screen.

User Guide

To create a Layout Custom Action, you will need to specify the action name that will be displayed on the Launcher home screen and the action type that will be executed.

After creating a Layout Custom Action, it can be assigned to a layout. For example, if you assign a custom action to the "Login" layout, it will be executed when the user logs in to the device.

Feature Configuration

The Launcher configuration allows you to define the Layout Custom Actions that can be performed or executed. Use the examples below as a guide:

Run XML

The custom action com.bluefletch.ems.RUN_XML allows for running an XML file, such a Stage Now profile, as a layot action shortcut. The layout item also requires an intent extra that defines the file location:

{
    "label": "Stage Now - Turn On Autorotate",
    "action": "com.bluefletch.ems.RUN_XML",
    "intentExtras": { 
        "file": "/sdcard/Download/ems/autorotateOn.xml"
    }
}

Alternatively, the same XML file can be referenced using Assets Manager:

{
    "label": "Stage Now - Turn On Autorotate",
    "action": "com.bluefletch.ems.RUN_XML",
    "intentExtras": { 
        "file": "assets:autorotateOn"
    }
}

Adjust Audio

The custom action com.bluefletch.ems.AUDIO can be used to adjust the volume of notification sounds, system sounds, or alarms. In the example below, the volume for notifications will be audible at full volume which is 100%, while the volume for other sounds can be adjusted to 50% only.

{
  "action" : "com.bluefletch.ems.AUDIO", 
  "label": "Audio - Half Volume (Except Notifications)", 
  "intentExtras": {
    "setting": "ADJUST_AUDIO",    
    "notification": 100,    
    "others": 50
  }
}

The custom action com.bluefletch.ems.AUDIO supports the intentExtras key-value pairs. The "setting" key-value pair specifies the type of audio setting that should be adjusted while the other key-value pairs specify the volume level for the corresponding sound. The volume level is specified as a whole number, where 0 is the lowest volume level and 100 is the highest volume level.

  • "setting": Set value to "ADJUST_AUDIO".

  • "notification": Value defines notification volume level by the whole number.

  • "music": Value defines music volume level by the whole number.

  • "ring": Value defines ringtone volume level by the whole number.

  • "system": Value defines system volume level by the whole number.

  • "dtmf": Value defines dual-tone multi-frequency volume level by the whole number.

  • "call": Value defines call volume level by the whole number.

  • "alarm": Value defines alarm volume level by the whole number.

  • "others": Value defines all volume levels not defined elsewhere by whole numbers.

Open WIFI Settings

BlueFletch also currently supports the custom action android.settings.WIFI_SETTINGS. When it is invoked, this will allow users to access the Wi-Fi settings from their devices. If wifiSettingsEnabled is set to true, end users can edit within the Wi-Fi Settings UI. False indicates no permission to change the Wi-Fi settings. In the example below, all users belonging to the Admin layout can access and/or edit the Wi-Fi settings.

"layouts" : {
    ...

    "ADMIN":[
      {
        "label" : "Wifi Settings",
        "action": "android.settings.WIFI_SETTINGS",
        "icon" : "com.android.settings",
        "wifiSettingsEnabled": true
      }

In the example below, users are allowed to view but not change the Wi-Fi settings.

  "layouts" : {
    ...

    "*": [
        {
            "label" : "Wifi Settings-ReadOnly",
            "action": "android.settings.WIFI_SETTINGS",
            "icon" : "com.android.settings",
            "wifiSettingsEnabled": false
       }
    ]
  },

Open Bluetooth Settings

BlueFletch also currently supports android.settings.BLUETOOTH_SETTINGS. When this custom action is enabled, it would open the Bluetooth settings screen on the current device.

Other Actions

Android Developer documentation provides a list of other Android Settings actions, although some actions may not currently be fully supported by BlueFletch.

Last updated