ii SB1 Programmer’s Guide
Application Timeout ................................................................................................................. 2-7
Upgrade from Older Versions ........................................................................................................ 2-8
Chapter 3: Application Shared Library
Application System Variables ............................................................................................ 3-1
Application Services ...................................................................................................................... 3-2
Running an Application ............................................................................................................ 3-2
Anonymous: asl.run(appUrl, data, callback); ..................................................................... 3-3
asl.exit(data); ..................................................................................................................... 3-4
asl. close (appName); ........................................................................................................ 3-5
asl. closeChildApp (data); .................................................................................................. 3-5
asl. closeAll (); .................................................................................................................... 3-5
asl. apps (list, append); ...................................................................................................... 3-6
asl. getUserData (); ............................................................................................................ 3-6
asl.minimize(); .................................................................................................................... 3-7
asl. fullscreen (); ................................................................................................................. 3-7
asl.reboot(); ........................................................................................................................ 3-7
asl. enableTouch (); ........................................................................................................... 3-7
asl. disableTouch (); ........................................................................................................... 3-8
Events ...................................................................................................................................... 3-8
asl.events.fire(eventName, data) ....................................................................................... 3-8
asl.events.subscribe(eventName, callback) ....................................................................... 3-8
asl.events.unbsubscribe(eventName) ................................................................................ 3-9
Native Shell Events ............................................................................................................ 3-9
Notification Services ...................................................................................................................... 3-10
Parameters .............................................................................................................................. 3-10
asl. clearNotification (all, type); .......................................................................................... 3-12
Keyboard Services ......................................................................................................................... 3-13
Explicit Keyboard Execution .................................................................................................... 3-13
Keyboard Events ................................................................................................................ 3-14
Shared UI Services ........................................................................................................................ 3-18
Back Button .............................................................................................................................. 3-18
Parameters ........................................................................................................................ 3-18
Title Label ................................................................................................................................ 3-19
Options Menu Button ............................................................................................................... 3-19
Parameters ........................................................................................................................ 3-21
Full Screen Mode ..................................................................................................................... 3-21
Resource Services ......................................................................................................................... 3-23
NPAPI ...................................................................................................................................... 3-23
Messaging Services ....................................................................................................................... 3-26
Authentication Services ................................................................................................................. 3-27
User Profiles and Authentication .............................................................................................. 3-27
Shell Authentication ................................................................................................................. 3-27
Parameters ........................................................................................................................ 3-28
Shell Authentication Properties .......................................................................................... 3-28
asl. signOut() ...................................................................................................................... 3-29
Application Authentication ........................................................................................................ 3-29
Badge Mode ....................................................................................................................... 3-29
asl.lock(url); ........................................................................................................................ 3-30
Setting User Profile from an Application ............................................................................ 3-30