Intent
s, abstract descriptions of intended
operations.See: Description
Interface | Description |
---|---|
Callback |
Callback invoked when an intent action has finished.
|
Class | Description |
---|---|
Intent |
Description of some intended operation.
|
IntentAction |
Actual action for an Intent.
|
Exception | Description |
---|---|
NoAvailableHandlerException |
Exception thrown when no handler is available for the Intent, or when
invocation of all handlers fails.
|
Intent
s, abstract descriptions of intended
operations.
Intents can be used when we want to perform some standard operation and we believe that the environment (the IDE, some application) is capable of finding and choosing correct action for it.
The operations are specified as pair of action type and a URI. See example:
Intent
i = new Intent
(Intent.ACTION_VIEW, new URI("file://path/file.txt"));
We can execute an Intent to let the system choose to most appropriate action for the intent and invoke it:
i.execute()
;
Or we can get list of all available actions, display them somehow, and let the user select one of them:
Set<IntentAction> available = i.getIntentActions()
;