Skip to content

Feature: Custom Intents Platform Actions

Overview

The custom intents have been enhanced to give greater control on device actions. By specifying the typeIntent is "p" and an action, the launcher will invoke the specific logic during the specified device life cycle (Login, Logout, Boot, Cradle, Uncradle, and ScreenOn).

See Launcher Configurations for more information on the Intents object.

Supported Platform Actions

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.

Login

An action value of "LOGIN" will cause the Launcher to invoke the Login UI.

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

Available in Launcher 3.7.7.

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 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"
}

Examples:

"intents" : {
    "login" : [
    ],
    "logout":[
        {
            "action": "CLEARCACHE",
            "package": "com.android.chrome",
            "typeIntent": "p"
        }
    ],
    "boot" : [],
    "uncradle": [{
        "action": "LOGIN",
        "typeIntent": "p"
    },{
        "action": "ADJUST_AUDIO",
        "typeIntent": "p",
        "extras" : {
            "others": 100
        }
    }],
    "cradle": [],
    "screenOn": []
  },