Mobile Development

There are several ways to handle event in android mobile application development. Events handling is used for interaction with users. In this blog I will explain how you can register your event handler for different controls. I am using Button click event as a use case in this blog and you can apply same technique for different events. Java provides a different ways to handle event and I will explain all these ways one by one.
Intent is the asynchronous message which allows android components to request functionality from the other component of the Android System. It represents an app’s ‘Intent to do something’. We can use intents for different tasks e.g. making call, open map, open activity etc. But most often they are used to start another activity.
Activity is a most important concept of Android development. It represents the screen in an application the user interacts with. You can use it in different ways as floating window or embedded inside of another activity etc. The class must be inherited from Activity class for your activity. extends keyword is used for inheritance in java. When you create a new project for android mobile it creates a one main activity for you. The code of the activity class is given below.