An is a Intent object that provides runtime binding between separate components (such as both activities). The intent represents an app's "intent to do something." You can use the intents for a wide variety of the tasks, but the most often they ' re used to start another activity.
Intent is a thing: it provides runtime bindings between different components, such as two activity. Intent represents an app "intent to do something". You can use intent to do many types of tasks, but usually it is used to start another activity
Inside sendMessage() The method, create an to Intent start an activity called DisplayMessageActivity :
Intent=newIntent(this, Displaymessageactivity. class );
The constructor used here takes the parameters:
- A as its first
Context parameter (was this used because the Activity class is a subclass of Context )
Classthe of the app component to which the system should deliver Intent the "the activity that should be s tarted)