Titanium.App

submodule of Titanium
           
0.1

The top level App module. The App module is mainly used for accessing information about the application at runtime.

Methods

Name Description
addEventListener add an event listener for the instance to receive view triggered events
fireEvent

fire a cross-context application event. listeners in any Javascript context can receive these events if they have added themselves as a listener with the event name. NOTE: you can only pass JSON serializable data in the data payload of the event object since the data must be transportable between contexts.

getArguments

return the arguments passed to the application on startup as a dictionary

removeEventListener remove a previously added event listener

Properties

Name Type Description
copyright string

the application's copyright

description string

the application's description

guid string

the application's globally unique id (this is system generated and consistent through all versions)

id string

the application's app id as specified in Titanium Developer

idleTimerDisabled boolean

property for controlling whether the phone screen will be locked on idle time. Can be set to true to disable the timer

name string

the application's name

proximityDetection boolean

a boolean to indicate whether proximity detection is enabled

proximityState int

the state of the device's proximity detector

publisher string

the application's publisher

url string

the application url

version string

the application's version

Events

Name Description
proximity

fired when a proximity state changes

Event properties

sourcethe source object that fired the event
state

the proximity state value

typethe name of the event fired