Skip to content

Feature: Custom Intents

Overview

Launcher has the ability to invoke Android Intents during certain device or user actions. These intents can be used to notify other applications that Logout is occuring, or that the user just logged in.

  • Login
  • Logout
  • Post Logout
  • Device Boot
  • Device Cradle
  • Device Uncradle
  • Screen On

Intents

Each area is a collection of Custom Intent objects, therefore mulitple actions can be taken per sceario.

"intents" : {
    "login" : [
    ],
    "logout":[
    ],
    "postLogout":[

    ],
    "boot" : [],
    "uncradle": [],
    "cradle": [],
    "screenOn": []
  },

See Launcher Configurations for more information on the Intents object.

Examples

a. After Login, start the calculator application:

"intents" : {
    "login" : [
        {
            "package": "com.android.calculator2",
            "typeIntent": "a"
        }
    ],
    "logout":[
    ],
    "postLogout":[

    ],
    "boot" : [],
    "uncradle": [],
    "cradle": [],
    "screenOn": []
  },

b. After Logout, start the battery application:

"intents" : {
    "login" : [
        {
            "package": "com.android.calculator2",
            "typeIntent": "a"
        }
    ],
    "logout":[
    ],
    "postLogout":[
         {
            "typeIntent" : "a",
            "package" : "com.symbol.batterymanager"
         }
    ],
    "boot" : [],
    "uncradle": [],
    "cradle": [],
    "screenOn": []
  },

Custom Intent Examples

a. To start an application, use intent type "a" and supply the package name.

{
      "package": "com.android.calculator2",
      "typeIntent": "a"
}

b. To invoke an action for an application, use intent type "a", provide the action, and optionally the package name.

{
    "action": "com.bluefletch.ems.remotecontrol.ACTION_START",
    "package": "com.bluefletch.ems.emm.remoteagent",
    "class": "com.bluefletch.ems.remotecontrol.RemoteActivity",
    "flags" : 1,
    "typeIntent": "a"
}

c. To delay processing before another intent is invoked, use the 'delay' intentType. Use type "d", and provide the delay, in milliseconds, within "data".

{
    "typeIntent": "d",
    "data": 5000
}

Feature Introduced

Feature Introduced in Launcher 2.6.x.