Titanium.App

Submodule of Titanium.
Platform Since
Android 0.1
iPhone 0.1
iPad 0.1
Mobile Web 1.8

Summary

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

Methods

Name Summary
addEventListener

Adds the specified callback as an event listener for the named event.

fireEvent

Fires a synthesized event to any registered listeners.

getArguments

return the arguments passed to the application on startup as a dictionary (iPhone, iPad only.)

getCopyright

Gets the value of the copyright property.

getDescription

Gets the value of the description property.

getGuid

Gets the value of the guid property.

getId

Gets the value of the id property.

getIdleTimerDisabled

Gets the value of the idleTimerDisabled property. (iPhone, iPad only.)

getName

Gets the value of the name property.

getProximityDetection

Gets the value of the proximityDetection property. (iPhone, iPad only.)

getProximityState

Gets the value of the proximityState property. (iPhone, iPad only.)

getPublisher

Gets the value of the publisher property.

getUrl

Gets the value of the url property.

getVersion

Gets the value of the version property.

removeEventListener

Removes the specified callback as an event listener for the named event.

setIdleTimerDisabled

Sets the value of the idleTimerDisabled property. (iPhone, iPad only.)

setProximityDetection

Sets the value of the proximityDetection property. (iPhone, iPad only.)

setProximityState

Sets the value of the proximityState property. (iPhone, iPad only.)

Properties

Name Type Summary
copyright String

the application's copyright read-only

description String

the application's description read-only

guid String

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

id String

the application's app id as specified in Titanium Developer or Titanium Studio read-only

idleTimerDisabled Boolean

property for controlling whether the phone screen will be locked on idle time. Can be set to true to disable the timer (iPhone, iPad only.)

name String

the application's name read-only

proximityDetection Boolean

a boolean to indicate whether proximity detection is enabled (iPhone, iPad only.)

proximityState Number

the state of the device's proximity detector (iPhone, iPad only.)

publisher String

the application's publisher read-only

url String

the application url read-only

version String

the application's version read-only

Events

Name Summary
pause

fired when an iOS application will stop being the focus. (iPhone, iPad only.)

proximity

fired when a proximity state changes (Android, iPhone, iPad only.)

resume

fired when an iOS application will enter the foreground due to iOS 4's multitasking. This does not include pauses due to notifications or calls. See applicationWillEnterForeground for the exact behavior that triggers this event. (iPhone, iPad only.)

resumed

fired when an iOS application will return to being the focus. This does include not only the events that trigger resume, but pauses due to notifications or calls. See applicationDidBecomeActive for the exact behavior that triggers this event. (iPhone, iPad only.)