Titanium 3.X

Titanium.App

The top-level App module is mainly used for accessing information about the application at runtime, and for sending or listening for system events.

The App module exposes a number of properties set in the tiapp.xml file.

Three of these properties, the application name, ID, and URL, must be specified when the application is created.

While most values may be changed by editing the tiapp.xml file after creating the project, the GUID is automatically generated and should not be changed.

To access other application properties set in the tiapp.xml file not exposed by the Titanium.App module, see Titanium.App.Properties.

iOS Application Life Cycle

At any given moment, you applications can be in one of the following possible states:

  • Not running: The app has not been launched or was running but was terminated by the system.

  • Inactive: The app is running in the foreground but is currently not receiving events. An app usually stays in this state only briefly as it transitions to a different state. The pause event is fired during this state.

  • Active: The app is running in the foreground and is receiving events. This is the normal mode for foreground apps.

  • Background: The app is in the background and executing code. Most apps enter this state briefly on their way to being suspended.

  • Suspended: The app is in the background but is not executing code. The system moves apps to this state automatically and does not notify them before doing so. While suspended, an app remains in memory but does not execute any code. The paused event is fired during this state. The system tries to keep as many apps in memory at the same time as it can, but when memory runs low it terminates suspended apps to reclaim that memory. Apps that consume large amounts of memory while in the background are the first apps to be terminated.

Responding To Interruptions

System Alerts

When an alert-based interruption occurs, such as an incoming phone call, the app moves temporarily to the inactive state, and fires the pause event. The system then displays an alert to the user. The app remains in this state until the user dismisses the alert. At this point, the app either returns to the active state and fires the resumed event; or moves to the background state and fires the paused event. In iOS 5, notifications that display a banner do not deactivate your app in the way that alert-based notifications do. However, if the user pulls down the banner to reveal the notification center, your app moves to the inactive state just as if an alert-based interruption had occurred.

Alert-based interruptions result in temporary loss of control by your app and results in pause event being fired. Your app continues to run in the foreground, but it does not recieve touch events from the system. (It does continue to receive notifications and other types of events, such as accelerometer events.) When your app is moved back to the active state, the resumed event is fired.

The same set of events takes place when user double taps on the home button.

Sleep/Wake Button

Pressing the Sleep/Wake button is another type of interruption that causes your app to move to an inactive state. When the app is in the foreground, if the Sleep/Wake button is pressed the following events take place:

  • In iOS 4.X the system fires the pause event and becomes inactive and on waking up the app fires the resumed event.

  • In iOS 5.0 and greater the system fires the pause event followed by the paused event and becomes inactive. This is an intentionally behavioral change by Apple to conserve battery when the Sleep/Wake button is pressed. On waking up the app fires the resume event followed by the resumed event and returns the app to normal state.

Home Button

Pressing the home button is another kind of interruption. The app fires pause and pausedevents before going into background. When app is reopened it fires the resume event followed by the resumed event, returning the app to the normal state.

Lifecycle events fired during different interruptions
Type of InterruptionGoing into BackgroundComing into Foreground
Alert-Based/Fast App Switchingpause resumed
Sleep/Wake Button iOS 4.Xpause resumed
iOS 5.0 +pausepausedresumeresumed
Home Button (backgrounding)pausepaused resumeresumed

Blur and Focus Events

When using the iOS pause/resume feature, the blur and focus events do not fire before the application enters the background or after it returns to the foreground, respectively. Instead, the application needs to monitor the pause and resumed events, which relies on the underlying iOS events to determine the application state rather than the UI events.

Application Level Events

Application-level events are custom events that are defined globally for your application. By convention, application-level events are set on the Titanium.App module, like this:

Ti.App.addEventListener('app:myCustomEvent', myHandlerFunction);

Adding a prefix (like 'app:' in this example) is optional, but can help ensure that your custom event names don't conflict with any future Titanium events.

Application-level event listeners can be added and fired from any context, including from inside a web view, so they are ideal for communicating between separate parts of your application.

When you add an event listener on a Titanium module (such as Ti.App or Ti.Geolocation), the event listener function is referenced from the global context. This means the event listener function and any objecst it references can't be garbage collected until the event listener is removed.

This can lead to memory leaks if application-level event listeners are added and not removed.

See also: Event Handling in the Titanium Mobile Guides.

System Level Accessibility Events

System-level Accessibility events include:

  • Events your application fires to alert the device's accessibility system of some condition or to ask it to do something.
  • Events fired by the device's accessibility system and listened for in your application.

Currently there are four system-level accessibility events. Three of them are available for your application to fire, and one of them is for your application to listen for.

Firing Accessibility Events.

The following accessibility events can be fired by your application to alert the accessibility system of a particular condition or to ask it to perform an action.

These events are fired using fireSystemEvent, which is available in Titanium Mobile 3.0.0.

  • EVENT_ACCESSIBILITY_ANNOUNCEMENT, available in iOS and Android, asks the device's accessibility system to make an announcement. The announcement itself is a string passed as the second argument to fireSystemEvent. How the device's accessibility actually makes that announcement depends on what accessibility services are activated on the device. The most common are VoiceOver on iOS and TalkBack on Android. Each of those would read the announcement aloud.

    Ti.App.fireSystemEvent(Ti.App.EVENT_ACCESSIBILITY_ANNOUNCEMENT, "Welcome to my App");
    
  • Titanium.App.iOS.EVENT_ACCESSIBILITY_LAYOUT_CHANGED, available only on iOS, can be used to alert the accessibility system that the layout of the screen has changed, such as when an element appears or disappears. When your application fires this event, Titanium calls UIAccessibilityLayoutChangedNotification in the iOS UIAccessibility Protocol. No second parameter is required when firing this event with fireSystemEvent.

  • Titanium.App.iOS.EVENT_ACCESSIBILITY_SCREEN_CHANGED, available only on iOS, can be used to alert the accessibility system when a new view appears that comprises a major portion of the screen. When your application fires this event, Titanium calls UIAccessibilityScreenChangedNotification in the iOS UIAccessibility Protocol. No second parameter is required when firing this event with fireSystemEvent.

Listening for Accessibility Events

Currently there is only one system accessibility event which your application can listen for using addEventListener, namely accessibilitychanged. This event, available on iOS and on Android (for devices running Ice Cream Sandwich or greater), is fired when the device's accessibility service is turned on or off. The object passed as a parameter to the listener function contains an enabled property which is true if the accessibility service is now turned on, or false otherwise.

  • 0.1
  • 3.1.2
  • 0.1
  • 0.1
  • 1.8
  • 3.1
Defined By

Properties

Titanium.App
EVENT_ACCESSIBILITY_ANNOUNCEMENT : Stringreadonly

Convenience constant for system event "accessibilityannouncement".

Convenience constant for system event "accessibilityannouncement".

  • 3.0
  • 3.0
  • 3.0
Titanium.App
EVENT_ACCESSIBILITY_CHANGED : Stringreadonly

Convenience constant for system event "accessibilitychanged".

Convenience constant for system event "accessibilitychanged".

  • 3.0
  • 3.0
  • 3.0
Titanium.App
accessibilityEnabled : Booleanreadonly

Indicates whether Accessibility is enabled by the system.

Indicates whether Accessibility is enabled by the system.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1
Titanium.App
analytics : Booleanreadonly

Indicates whether Analytics is enabled, determined by tiapp.xml.

Indicates whether Analytics is enabled, determined by tiapp.xml.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1
apiName : Stringreadonly

The name of the API that this proxy corresponds to.

The name of the API that this proxy corresponds to.

The value of this property is the fully qualified name of the API. For example, Button returns Ti.UI.Button.

  • 3.2
  • 3.2
  • 3.2
  • 3.2
  • 3.2
  • 3.2
Indicates if the proxy will bubble an event to its parent. ...

Indicates if the proxy will bubble an event to its parent.

Some proxies (most commonly views) have a relationship to other proxies, often established by the add() method. For example, for a button added to a window, a click event on the button would bubble up to the window. Other common parents are table sections to their rows, table views to their sections, and scrollable views to their views. Set this property to false to disable the bubbling to the proxy's parent.

Default: true

  • 3.0
  • 3.0
  • 3.0
Titanium.App
deployType : Stringreadonly

Build type that reflects how the application was packaged; either test, development or production.

Build type that reflects how the application was packaged; either test, development or production.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1
Titanium.App
description : Stringreadonly

Application description, determined by tiapp.xml.

Application description, determined by tiapp.xml.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1
Titanium.App
: Boolean
Prevents network activity indicator from being displayed. ...

Prevents network activity indicator from being displayed.

Setting this property to true disables display of the network activity indicator when network activity is in progress. If the network activity indicator is currently visible, it is hidden immediately.

NOTE: In general, the user should always be made aware of network activity. The network activity indicator should only be disabled for very brief network activity (a few seconds).

Default: false

  • 3.0
  • 3.0
Titanium.App
forceSplashAsSnapshot : Boolean

Shows the application's splash screen on app resume.

Shows the application's splash screen on app resume.

Note: This only works on device. When the app goes to the background a screenshot of the current app state is taken. When the app resumes that screenshot is shown for brief moment. To disable this behavior, set this property to true and the default splash screen will show on app resume instead.

  • 0.1
  • 0.1
Titanium.App
guid : Stringreadonly

Application globally-unique ID, determined by tiapp.xml.

Application globally-unique ID, determined by tiapp.xml.

This value is system-generated and consistent through all versions.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1
Titanium.App
id : Stringreadonly

Application ID, from tiapp.xml.

Application ID, from tiapp.xml.

The application ID is a required property that must be specified when creating a new project.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1
Titanium.App
idleTimerDisabled : Boolean

Determines whether the screen is locked when the device is idle.

Determines whether the screen is locked when the device is idle.

Set to true to disable the timer.

  • 0.1
  • 0.1
Titanium.App
installId : Stringreadonly

The install ID for this application.

The install ID for this application.

The application install ID is a unique identifier (UUID) for this install of the application. It is not modified by application updates; only when an application is initially installed, or removed and re-installed.

  • 2.0
  • 2.0
Titanium.App
keyboardVisible : Booleanreadonly

Indicates whether or not the soft keyboard is visible.

Indicates whether or not the soft keyboard is visible.

  • 0.1
  • 0.1
Titanium.App
name : Stringreadonly

Application name, determined by tiapp.xml.

Application name, determined by tiapp.xml.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1
Titanium.App
: Boolean
Determines whether proximity detection is enabled. ...

Determines whether proximity detection is enabled.

Set to true to receive proximity events.

Default: false

  • 0.1
  • 0.1
Titanium.App
proximityState : Booleanreadonly

Indicates the state of the device's proximity sensor, according to the proximity event.

Indicates the state of the device's proximity sensor, according to the proximity event.

This property is true when the proximity sensor is close to the user.

When proximityDetection is disabled, the value of this property is undefined.

  • 0.1
Titanium.App
publisher : Stringreadonly

Application publisher, from tiapp.xml.

Application publisher, from tiapp.xml.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1
Titanium.App
sessionId : Stringreadonly

Unique session identifier for the current continuous run of the application.

Unique session identifier for the current continuous run of the application.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1
Titanium.App
url : Stringreadonly

Application URL, from tiapp.xml.

Application URL, from tiapp.xml.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1
Titanium.App
version : Stringreadonly

Application version, from tiapp.xml.

Application version, from tiapp.xml.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1
Defined By

Methods

( name, callback ) : void
Adds the specified callback as an event listener for the named event. ...

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

Parameters

  • name : String

    Name of the event.

  • callback : Callback<Object>

    Callback function to invoke when the event is fired.

Returns

  • void
Applies the properties to the proxy. ...

Applies the properties to the proxy.

Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that myproxy[key] = value.

  • 3.0
  • 3.0
  • 3.0

Parameters

  • props : Dictionary

    A dictionary of properties to apply.

Returns

  • void
( name, event ) : void
Fires a synthesized event to any registered listeners. ...

Fires a synthesized event to any registered listeners.

Parameters

  • name : String

    Name of the event.

  • event : Dictionary

    A dictionary of keys and values to add to the Titanium.Event object sent to the listeners.

Returns

  • void
Titanium.App
( eventName, [param] ) : void
Fire a system-level event such as EVENT_ACCESSIBILITY_ANNOUNCEMENT. ...

Fire a system-level event such as EVENT_ACCESSIBILITY_ANNOUNCEMENT.

  • 3.0
  • 3.0
  • 3.0

Parameters

  • eventName : String

    The name of the event to fire.

  • param : Object (optional)

    A parameter to be passed to the system event.

Returns

  • void
Titanium.App
( ) : Boolean
Gets the value of the accessibilityEnabled property. ...

Gets the value of the accessibilityEnabled property.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1

Returns

  • Boolean
Titanium.App
( ) : Boolean
Gets the value of the analytics property. ...

Gets the value of the analytics property.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1

Returns

  • Boolean
Gets the value of the apiName property. ...

Gets the value of the apiName property.

  • 3.2
  • 3.2
  • 3.2
  • 3.2
  • 3.2
  • 3.2

Returns

  • String
Titanium.App
( ) : launchOptions
Returns the arguments passed to the application on startup. ...

Returns the arguments passed to the application on startup.

On Android, use the intent property of the activity to retrieve the parameters passed to launch the application activity.

  • 0.1
  • 0.1

Returns

Gets the value of the bubbleParent property. ...

Gets the value of the bubbleParent property.

  • 3.0
  • 3.0
  • 3.0

Returns

  • Boolean
Titanium.App
( ) : String
Gets the value of the copyright property. ...

Gets the value of the copyright property.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1

Returns

  • String
Titanium.App
( ) : String
Gets the value of the deployType property. ...

Gets the value of the deployType property.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1

Returns

  • String
Titanium.App
( ) : String
Gets the value of the description property. ...

Gets the value of the description property.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1

Returns

  • String
Titanium.App
( ) : Boolean
Gets the value of the disableNetworkActivityIndicator property. ...

Gets the value of the disableNetworkActivityIndicator property.

  • 3.0
  • 3.0

Returns

  • Boolean
Titanium.App
( ) : Boolean
Gets the value of the forceSplashAsSnapshot property. ...

Gets the value of the forceSplashAsSnapshot property.

  • 0.1
  • 0.1

Returns

  • Boolean
Titanium.App
( ) : String
Gets the value of the guid property. ...

Gets the value of the guid property.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1

Returns

  • String
Titanium.App
( ) : String
Gets the value of the id property. ...

Gets the value of the id property.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1

Returns

  • String
Titanium.App
( ) : Boolean
Gets the value of the idleTimerDisabled property. ...

Gets the value of the idleTimerDisabled property.

  • 0.1
  • 0.1

Returns

  • Boolean
Titanium.App
( ) : String
Gets the value of the installId property. ...

Gets the value of the installId property.

  • 2.0
  • 2.0

Returns

  • String
Titanium.App
( ) : Boolean
Gets the value of the keyboardVisible property. ...

Gets the value of the keyboardVisible property.

  • 0.1
  • 0.1

Returns

  • Boolean
Titanium.App
( ) : String
Gets the value of the name property. ...

Gets the value of the name property.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1

Returns

  • String
Titanium.App
( ) : Boolean
Gets the value of the proximityDetection property. ...

Gets the value of the proximityDetection property.

  • 0.1
  • 0.1

Returns

  • Boolean
Titanium.App
( ) : Boolean
Gets the value of the proximityState property. ...

Gets the value of the proximityState property.

  • 0.1

Returns

  • Boolean
Titanium.App
( ) : String
Gets the value of the publisher property. ...

Gets the value of the publisher property.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1

Returns

  • String
Titanium.App
( ) : String
Gets the value of the sessionId property. ...

Gets the value of the sessionId property.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1

Returns

  • String
Titanium.App
( ) : String
Gets the value of the url property. ...

Gets the value of the url property.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1

Returns

  • String
Titanium.App
( ) : String
Gets the value of the version property. ...

Gets the value of the version property.

  • 0.1
  • 0.1
  • 0.1
  • 1.8
  • 3.1

Returns

  • String
( name, callback ) : void
Removes the specified callback as an event listener for the named event. ...

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

Multiple listeners can be registered for the same event, so the callback parameter is used to determine which listener to remove.

When adding a listener, you must save a reference to the callback function in order to remove the listener later:

var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);

To remove the listener, pass in a reference to the callback function:

window.removeEventListener('click', listener);

Parameters

  • name : String

    Name of the event.

  • callback : Callback<Object>

    Callback function to remove. Must be the same function passed to addEventListener.

Returns

  • void
( bubbleParent ) : void
Sets the value of the bubbleParent property. ...

Sets the value of the bubbleParent property.

  • 3.0
  • 3.0
  • 3.0

Parameters

  • bubbleParent : Boolean

    New value for the property.

Returns

  • void
Titanium.App
( disableNetworkActivityIndicator ) : void
Sets the value of the disableNetworkActivityIndicator property. ...

Sets the value of the disableNetworkActivityIndicator property.

  • 3.0
  • 3.0

Parameters

  • disableNetworkActivityIndicator : Boolean

    New value for the property.

Returns

  • void
Titanium.App
( forceSplashAsSnapshot ) : void
Sets the value of the forceSplashAsSnapshot property. ...

Sets the value of the forceSplashAsSnapshot property.

  • 0.1
  • 0.1

Parameters

  • forceSplashAsSnapshot : Boolean

    New value for the property.

Returns

  • void
Titanium.App
( idleTimerDisabled ) : void
Sets the value of the idleTimerDisabled property. ...

Sets the value of the idleTimerDisabled property.

  • 0.1
  • 0.1

Parameters

  • idleTimerDisabled : Boolean

    New value for the property.

Returns

  • void
Titanium.App
( proximityDetection ) : void
Sets the value of the proximityDetection property. ...

Sets the value of the proximityDetection property.

  • 0.1
  • 0.1

Parameters

  • proximityDetection : Boolean

    New value for the property.

Returns

  • void
Defined By

Events

Fired by the system when the device's accessibility service is turned on or off. ...

Fired by the system when the device's accessibility service is turned on or off.

  • 3.0
  • 3.0
  • 3.0

Properties

  • bubbles : Boolean

    True if the event will try to bubble up if possible.

    •  
    •  
    •  
  • cancelBubble : Boolean

    Set to true to stop the event from bubbling.

    •  
    •  
    •  
  • enabled : Boolean

    Whether accessibility is now enabled or disabled.

  • source : Object

    Source object that fired the event.

  • type : String

    Name of the event fired.

Titanium.App
deprecated
Fired when the soft keyboard is presented, on and off the screen. ...

Fired when the soft keyboard is presented, on and off the screen.

deprecated

3.0.0

Renamed to keyboardframechanged (all lowercase).

This event fires when the application presents the soft keyboard on/off the screen . The event returns the dictionary containing keyboardFrame.x, keyboardFrame.y, keyboardFrame.height and keyboardFrame.width variables, corresponding to the frame of the keyboard with respect to the screen coordinates.

Note that the keyboard height and width properties will not be accurate when the keyboard is being dissmissed.

  • 2.1
  • 2.1

Properties

  • bubbles : Boolean

    True if the event will try to bubble up if possible.

    •  
    •  
    •  
  • cancelBubble : Boolean

    Set to true to stop the event from bubbling.

    •  
    •  
    •  
  • source : Object

    Source object that fired the event.

  • type : String

    Name of the event fired.

Fired when the soft keyboard is presented, on and off the screen. ...

Fired when the soft keyboard is presented, on and off the screen.

This event fires when the application presents the soft keyboard on/off the screen . The event returns the dictionary containing keyboardFrame.x, keyboardFrame.y, keyboardFrame.height and keyboardFrame.width variables, corresponding to the frame of the keyboard with respect to the screen coordinates.

Note that the keyboard height and width properties will not be accurate when the keyboard is being dissmissed.

  • 3.0
  • 3.0

Properties

  • bubbles : Boolean

    True if the event will try to bubble up if possible.

    •  
    •  
    •  
  • cancelBubble : Boolean

    Set to true to stop the event from bubbling.

    •  
    •  
    •  
  • source : Object

    Source object that fired the event.

  • type : String

    Name of the event fired.

Titanium.App
Fired when the app receives a warning from the operating system about low memory availability. ...

Fired when the app receives a warning from the operating system about low memory availability.

  • 3.2.3
  • 3.2.3

Properties

  • bubbles : Boolean

    True if the event will try to bubble up if possible.

    •  
    •  
    •  
  • cancelBubble : Boolean

    Set to true to stop the event from bubbling.

    •  
    •  
    •  
  • source : Object

    Source object that fired the event.

  • type : String

    Name of the event fired.

Titanium.App
Fired when the application transitions from active to inactive state on a multitasked system. ...

Fired when the application transitions from active to inactive state on a multitasked system.

Available on iOS 4.0 and later.

This event fires when the user leaves the application or for certain types of temporary interruptions such as a notification or incoming phone call.

See the applicationWillResignActive section of the official Apple documentation about Monitoring Application State Changes for the exact behavior that triggers this event.

Note that calls to functions that modify the UI during this event may be partially executed, up to the UI call before the suspension. See paused event. If this happens, the remainder of the code will be executed after the application is resumed, but before the resume event is triggered.

  • 0.1
  • 0.1

Properties

  • bubbles : Boolean

    True if the event will try to bubble up if possible.

    •  
    •  
    •  
  • cancelBubble : Boolean

    Set to true to stop the event from bubbling.

    •  
    •  
    •  
  • source : Object

    Source object that fired the event.

  • type : String

    Name of the event fired.

Titanium.App
Fired when the application transitions to the background on a multitasked system. ...

Fired when the application transitions to the background on a multitasked system.

On iOS 4.0 and later, this event only fires when putting the application in the background using the home button.

On iOS 5.0 and later, this event also fires when using the sleep/wake or power button.

This event fires when the user leaves the application.

See the applicationDidEnterBackground section of the official Apple documentation about Monitoring Application State Changes for the exact behavior that triggers this event.

  • 2.1
  • 2.1

Properties

  • bubbles : Boolean

    True if the event will try to bubble up if possible.

    •  
    •  
    •  
  • cancelBubble : Boolean

    Set to true to stop the event from bubbling.

    •  
    •  
    •  
  • source : Object

    Source object that fired the event.

  • type : String

    Name of the event fired.

Titanium.App
Fired when the proximity sensor changes state. ...

Fired when the proximity sensor changes state.

The proximity sensor detects whether the device is being held up to the user's ear, and shuts down the display.

Proximity events are only fired when proximityDetection is true.

  • 0.1

Properties

  • bubbles : Boolean

    True if the event will try to bubble up if possible.

    •  
    •  
    •  
  • cancelBubble : Boolean

    Set to true to stop the event from bubbling.

    •  
    •  
    •  
  • source : Object

    Source object that fired the event.

  • state : Object

    Proximity state value.

  • type : String

    Name of the event fired.

Titanium.App
Fired when the application returns to the foreground on a multitasked system. ...

Fired when the application returns to the foreground on a multitasked system.

On iOS 4.0 and later, this event only fires when putting the application in the background using the home button.

On iOS 5.0 and later, this event also fires when using the sleep/wake or power button.

Note that this event does not fire for pauses resulting from notifications or incoming phone calls.

See the applicationWillEnterForeground section of the official Apple documentation about Monitoring Application State Changes for the exact behavior that triggers this event.

  • 0.1
  • 0.1

Properties

  • bubbles : Boolean

    True if the event will try to bubble up if possible.

    •  
    •  
    •  
  • cancelBubble : Boolean

    Set to true to stop the event from bubbling.

    •  
    •  
    •  
  • source : Object

    Source object that fired the event.

  • type : String

    Name of the event fired.

Titanium.App
Fired when the application returns to the foreground. ...

Fired when the application returns to the foreground.

This event fires when the application enters the foreground with the resume event or returns to focus after a notification or incoming phone call.

See the applicationDidBecomeActive section of the official Apple documentation about Monitoring Application State Changes for the exact behavior that triggers this event.

  • 0.1
  • 0.1

Properties

  • bubbles : Boolean

    True if the event will try to bubble up if possible.

    •  
    •  
    •  
  • cancelBubble : Boolean

    Set to true to stop the event from bubbling.

    •  
    •  
    •  
  • source : Object

    Source object that fired the event.

  • type : String

    Name of the event fired.

Fired when there is a significant change in the time. ...

Fired when there is a significant change in the time.

Examples of significant time changes include the arrival of midnight, an update to the time by a carrier, and the change to daylight savings time. If your application is currently in paused state, this message will be is queued until your application returns to the foreground, at which point it is delievered. If multiple changes occur, only the most recent one is delievered.

  • 3.1
  • 3.1

Properties

  • bubbles : Boolean

    True if the event will try to bubble up if possible.

    •  
    •  
    •  
  • cancelBubble : Boolean

    Set to true to stop the event from bubbling.

    •  
    •  
    •  
  • source : Object

    Source object that fired the event.

  • type : String

    Name of the event fired.