| Platform | Since |
|---|---|
| Android | 1.5 |
The Titanium binding of an Android Intent
var intent = Ti.Android.createIntent({ action: Ti.Android.ACTION_MAIN, url: 'activity1.js' }); intent.addCategory(Ti.Android.CATEGORY_LAUNCHER); Ti.Android.currentActivity.startActivity(intent);
var intent = Ti.Android.createIntent({ action: Ti.Android.ACTION_GET_CONTENT, type: "vnd.android.cursor.item/phone" });
var intent = Ti.Android.createIntent({ action: Ti.Android.ACTION_PICK, type: "image/*" }); intent.addCategory(Ti.Android.CATEGORY_DEFAULT);
| Name | Summary |
|---|---|
| addCategory |
Add a category to this Intent. See the category constants in |
| addEventListener |
Adds the specified callback as an event listener for the named event. |
| addFlags |
augment the existing flags on the Intent. |
| fireEvent |
Fires a synthesized event to any registered listeners. |
| getBooleanExtra |
Get a boolean property from this Intent |
| getData |
Get the Data URI from this Intent |
| getDoubleExtra |
Get a double property from this Intent |
| getIntExtra |
Get a int property from this Intent |
| getLongExtra |
Get a long property from this Intent |
| getStringExtra |
Get a string property from this Intent |
| hasExtra |
Returns whether or not this Intent has a property |
| putExtra |
Put an extra property on this Intent |
| putExtraUri |
Put a URI property on this Intent (useful for |
| removeEventListener |
Removes the specified callback as an event listener for the named event. |
| Name | Type | Summary |
|---|---|---|
| action | String |
An action constant from |
| className | String |
The Java class name of the activity (packageName must also be set) creation |
| data | String |
The Intent's Data URI. See also Android's Intent.setData read-only |
| flags | Number |
Intent flags. See the flags constants in |
| packageName | String |
The fully-qualified Java package name of the activity creation |
| type | String |
The mime type for this Intent. See also Android's Intent.setType creation |
| url | String |
The URL to a Titanium Javascript Activity creation |