| Platform | Since |
|---|---|
| Android | 1.5 |
The Titanium binding of an Android Activity
activity.startActivityForResult(intent, function(e) { // The request code used to start this Activity var requestCode = e.requestCode; // The result code returned from the Activity (http://developer.android.com/reference/android/app/Activity.html#StartingActivities) var resultCode = e.resultCode; // A Titanium.Android.Intent filled with data returned from the Activity var intent = e.intent; // The Activity the received the result var source = e.source; });
| Name | Summary |
|---|---|
| addEventListener |
Adds the specified callback as an event listener for the named event. |
| finish |
Called when the activity is done and should be closed. Also see Android's documentation for finish |
| fireEvent |
Fires a synthesized event to any registered listeners. |
| getIntent |
Gets the value of the intent property. |
| getString |
Get an Android or Application string using the passed-in Resource ID and optional format arguments. Also see Android's documentation for getString and String Resources |
| removeEventListener |
Removes the specified callback as an event listener for the named event. |
| setRequestedOrientation |
Set the requested Activity orientation. Also see Android's documentation for setRequestedOrientation |
| setResult |
Sets the result of this Activity using an Intent. This should be used in the case when the Activity responds to startActivityForResult. Also see Android's documentation for setResult |
| startActivity |
Starts a new Activity, using the passed in Intent as the description. Also see Android's documentation for startActivity |
| startActivityForResult |
The same as |
| Name | Type | Summary |
|---|---|---|
| intent | Titanium.Android.Intent |
The |
| onCreateOptionsMenu | Callback<Object> |
A callback function that is called to initially create an Android Options Menu for this Activity when the user presses the Menu button. See the menu examples in |
| onPrepareOptionsMenu | Callback<Object> |
A callback function that is called to prepare an Options Menu for displaying on this Activity when the user presses the Menu button. See the menu examples in |
| requestedOrientation | Number |
Can be one of |
| Name | Summary |
|---|---|
| create |
Fired from the Activity's onCreate |
| destroy |
Fired from the Activity's onDestroy |
| newIntent |
Fired when the application is already running and certain flags are set in the Intent. Fired from the Activity's onNewIntent |
| pause |
Fired from the Activity's onPause |
| resume |
Fired from the Activity's onResume |
| start |
Fired from the Activity's onStart |
| stop |
Fired from the Activity's onStop |