Lifecycle Actions/Manager
Lifecycle Manager
● Starts and stops user sessions
● Keeps track of active sessions
● Saves the original state of the system
● Applies settings through Settings
  Handlers
● Launches AT applications via
  Lifecycle Actions (Launch Handlers)
Lifecycle Action
● Contains start and stop configurations
● Examples of the lifecycle actions:
  ○ exec (runs given command in shell)
  ○ "setSettings", "restoreSettings"
exec Lifecycle Action
{
    start: [
       {
         type: 'gpii.launch.exec',
         command: 'firefox'
       }
    ],
    stop: [
       {
         type: 'gpii.launch.exec',
         command: 'pkill -2 firefox'
       }
    ]
}
Settings handlers lifecycle actions
              "setSettings" / "restoreSettings"

{
    start: [
       "setSettings",
       {
          type: 'gpii.launch.exec',
          command: 'firefox'
       }
    ],
    stop: [
       {
          type: 'gpii.launch.exec',
          command: 'pkill -2 firefox'
       },
       "restoreSettings"
    ]
}
Creating Lifecycle Action
Screen magnifier example

  {
    start: [
        "setSettings", {
        type: 'gpii.launch.exec',
        command: 'gsettings set org.gnome.desktop.a11y.
  applications screen-magnifier-enabled true'
    }],
    stop: [{
        type: 'gpii.launch.exec',
        command: 'gsettings set org.gnome.desktop.a11y.
  applications screen-magnifier-enabled false'
    }, "restoreSettings"]
  }

Lifecycle actions manager

  • 1.
  • 2.
    Lifecycle Manager ● Startsand stops user sessions ● Keeps track of active sessions ● Saves the original state of the system ● Applies settings through Settings Handlers ● Launches AT applications via Lifecycle Actions (Launch Handlers)
  • 3.
    Lifecycle Action ● Containsstart and stop configurations ● Examples of the lifecycle actions: ○ exec (runs given command in shell) ○ "setSettings", "restoreSettings"
  • 4.
    exec Lifecycle Action { start: [ { type: 'gpii.launch.exec', command: 'firefox' } ], stop: [ { type: 'gpii.launch.exec', command: 'pkill -2 firefox' } ] }
  • 5.
    Settings handlers lifecycleactions "setSettings" / "restoreSettings" { start: [ "setSettings", { type: 'gpii.launch.exec', command: 'firefox' } ], stop: [ { type: 'gpii.launch.exec', command: 'pkill -2 firefox' }, "restoreSettings" ] }
  • 6.
    Creating Lifecycle Action Screenmagnifier example { start: [ "setSettings", { type: 'gpii.launch.exec', command: 'gsettings set org.gnome.desktop.a11y. applications screen-magnifier-enabled true' }], stop: [{ type: 'gpii.launch.exec', command: 'gsettings set org.gnome.desktop.a11y. applications screen-magnifier-enabled false' }, "restoreSettings"] }