Custom Intents Platform Actions

Custom Intents Platform Actions is a Launcher feature that enables greater control over device actions.

Overview

Custom Intents Platform Actions is a Launcher feature that enables greater control over device actions by using custom intents with specific actions during a specified device life cycle such as Login, Logout, Screen On, Boot, Cradle, and Un-Cradle.

User Guide

If custom intents with specific actions are set up in the configuration, the Launcher will invoke the specific logic during a specific processing point, e.g., Login, Logout, Screen On, Boot, Cradle, and Un-Cradle.

Feature Configuration

The Launcher configuration allows you to define the platform actions that can be performed or executed when a custom intent is invoked. Use the examples below as a guide:

Login

During login, an action value of "com.bluefletch.launcher.ACTION_ROTATE_LANDSCAPE" will force rotation of the Launcher Home screen to landscape mode.

    "login": [
        {
            "action": "com.bluefletch.launcher.ACTION_ROTATE_LANDSCAPE",
            "typeIntent": "p"
        }
    ],

Available in Launcher 3.7.7.

Logout

Following logout, the Launcher invokes the Platform Clear Cache process for the Chrome app (com.android.chrome) to clear cached data; it also forces the Launcher Home screen to rotate to portrait mode via the com.bluefletch.launcher.ACTION_ROTATE_PORTRAIT intent.

    "logout":[
        {
            "action": "CLEARCACHE",
            "package": "com.android.chrome",
            "typeIntent": "p"
        },
        {
            "action": "com.bluefletch.launcher.ACTION_ROTATE_PORTRAIT",
            "typeIntent": "p"
        }
    ],

Uncradle

When the device is uncradled, an action value of "LOGIN" will cause the Launcher to invoke the Login UI. Additionally, an action value of "ADJUST_AUDIO" will cause the audio on a device to be changed and allows for specifying the percentage of max audio per type of audio.

    "uncradle": [
        {
            "action": "LOGIN",
            "typeIntent": "p"
        },
        {
            "action": "ADJUST_AUDIO",
            "typeIntent": "p",
            "extras": {
                "others": 100
            }
        }
    ],

Clear Cache

An action value of "CLEARCACHE" will cause Launcher to invoke the Platform Clear Cache on the specified package.

{
    "action": "CLEARCACHE",
    "package": "com.android.chrome",
    "typeIntent": "p"
}

Available in Launcher 3.6.x.

Enable a Package

An action value of "ENABLE" will cause the specified package to be enabled.

{
    "action": "ENABLE",
    "typeIntent": "p",
    "package" : "com.some.package"
}

Available in Launcher 3.14.5.

Disable a Package

An action value of "DISABLE" will cause the specified package to be disabled.

{
    "action": "DISABLE",
    "typeIntent": "p",
    "package" : "com.some.package"
}

Available in Launcher 3.14.5.

Delete Files

An action value of "DELETE_FILES" will delete the file(s) at the specified path as specified in the data field. This action does support the wildcard operator * which allows for multiple files to be deleted.

{
    "action": "DELETE_FILES",
    "typeIntent": "p",
    "data": "/sdcard/Download/*.pdf"
}

Available in Launcher 3.14.15.

Mute Audio

An action value of "MUTE_AUDIO" will cause the audio on a device to be muted. This does not affect 'Alarm' audio. This feature requires Launcher to be granted Notification Access.

{
    "action": "MUTE_AUDIO",
    "typeIntent": "p"
}

Available in Launcher 3.16.3.

Unmute Audio

An action value of "UNMUTE_AUDIO" will cause the audio on a device to be unmuted. This does not affect 'Alarm' audio. This feature requires Launcher to be granted Notification Access.

{
    "action": "UNMUTE_AUDIO",
    "typeIntent": "p"
}

Available in Launcher 3.16.3.

Adjust Audio

An action value of "ADJUST_AUDIO" will cause the audio on a device to be changed and allows for specifying the percentage of max audio per type of audio. The individual audio stream to affect should be specified within the extras section.

Valid extras:

  • notification: Affects the volume of audio streams for notification sounds.

  • music: Affects the volume of audio streams for music playback.

  • ring: Affects the volume of audio streams for the phone ring.

  • system: Affects the volume of audio streams for system sounds.

  • dtm: Affects the volume of audio streams for DTMF Tones.

  • call: Affects the volume of audio streams for phone calls.

  • alarm: Affects identify the volume of audio streams for alarms.

  • others: A special override that when used, can affect any audio stream not specified within the extras.

{
    "action": "ADJUST_AUDIO",
    "typeIntent": "p",
    "extras" : {
        "notification": 90,
        "alarm": 100,
        "others": 50
    }
}

Available in Launcher 3.16.3.

Applying Platform XML

The action "XML" allows for invoking platform specific XML. Use the "data" field to specify the XML file location, either located on the device sdcard or managed within launcher assets. Currently this feature only supports Zebra StageNow™.

{
    "action": "XML",
    "typeIntent": "p",
    "data": "/sdcard/Download/ems/gloveInput.xml"
}

This example is using the ASSETS manager to download/manage.

{
    "action": "XML",
    "typeIntent": "p",
    "data": "assets:stylusInput"
}

Rotate Launcher to Portrait Mode

An action value of "com.bluefletch.launcher.ACTION_ROTATE_PORTRAIT" will force rotation of the Launcher Home screen to portrait mode.

{
    "action": "com.bluefletch.launcher.ACTION_ROTATE_PORTRAIT",
    "typeIntent": "p"
}

Available in Launcher 3.21.17.

Rotate Launcher to Landscape Mode

An action value of "com.bluefletch.launcher.ACTION_ROTATE_LANDSCAPE" will force rotation of the Launcher Home screen to landscape mode.

{
    "action": "com.bluefletch.launcher.ACTION_ROTATE_LANDSCAPE",
    "typeIntent": "p"
}

Available in Launcher 3.21.17.

Putting It All Together

For the example described above, the full configuration for the Custom Intents Platform Actions feature is as follows:

"intents": {
    "preLogin": [],
    "login": [
        {
            "action": "com.bluefletch.launcher.ACTION_ROTATE_LANDSCAPE",
            "typeIntent": "p"
        }
    ],
    "logout":[
        {
            "action": "CLEARCACHE",
            "package": "com.android.chrome",
            "typeIntent": "p"
        },
        {
            "action": "com.bluefletch.launcher.ACTION_ROTATE_PORTRAIT",
            "typeIntent": "p"
        }
    ],
    "postLogout": [],
    "boot": [],
    "uncradle": [
        {
            "action": "LOGIN",
            "typeIntent": "p"
        },
        {
            "action": "ADJUST_AUDIO",
            "typeIntent": "p",
            "extras": {
                "others": 100
            }
        }
    ],
    "cradle": [],
    "screenOn": [],
    "motionLockEnter": [],
    "motionLockExit": [],
    "siteChange": []
  },

Last updated