Befor any developer starts to work with a application framework there are some key concepts that should be learned. In order to work with Android you need to understand view, activity, fragments, intents, content providers, services as well as Android manifest file.
View is an user interface element. It can be a textfield, a button or any other UI element. This concept is simillar to views in Swing and J2EE. View can also be used as containers for other views but in the final phase all that can be saw is a view.
Activities are user interface concept and they are usually single screens in Android application. An activity contains views but it also can exists without any view. Mostly, there are several activities within an Android application.
You can imagine fragments as sub-activities contained within an activity. They are used in cases when, for example, a screen is large so it is not so easy to manage all of its features in one activity. So, if a screen is small, an activity usually contains only one fragment.
Intents contains several concepts and they can be used to finish some of the following jobs:
- to broadcast messages
- for a service starting
- for an activity launching
- to display lists with data or a website's page
- to send SMS messages and dial phone numbers
Intents are also used by the core system for notifying an application of some events (e.g. arrival of a SMS)
They can be explicit and implicit.
Content Provider is used for exposing data from one application for using in some other appliction(s). So, its role is to provide data sharing among mobile applications on a device.
Services represent background processes and there are two types of them: local and remote services.
Difference is that local services are only accessible by the applications that contains the service and remote services can be accessed by other applications installed on the same device. For example, a service is a component that checks whether new emails have received or not. It could be used by one or more programs so it could be local or remote service.
Android Virtual Devices (AVD)
Android virtual device is used for application testing without phisical mobile devices. It is very useful in development process and can be configured to emulate different types of mobile devices.
AndroidManifest.xms file contains information about your application's content and behaviour. You can compare it to web.xml file in J2EE applications. AndroidManifest.xml could contain, for example, services, activities, permissions etc.