Android is a Linux based operating system and it has a Java programming interface. In this Android Basics tutorial you will understand the basics of Android applications development and the features of Android.The Android SDK consists of tools to develop android applications. Android SDK stands for Android Software Development Kit. It contains of a compiler, debugger, a device emulator and its own virtual machine to run android programs. Android is developed by Google. Google hosts android applications and the Google Play applications permits to install fresh android applications on an android device. Google allows the Google Play services and this service is used to be called the “Android Market.”
The features that Android provides are
Android provides several security mechanisms. They are
1) Make a unique user and group ID: – The android system will create a unique user and group ID for each application. This helps for each application file as private to this user.
Eg: – Other applications cannot access these files
2) All the android applications will be running in its process.
3) Android application is isolated: – In Linux operating system each Android application is isolated from other running applications. So one application cannot easily harm other Android applications.
4) Android applications are explicit: – If data should be shared, the application must do this explicitly.
Eg: – We are using Service or a ContentProvider.
Android consists of permission system. They are
1) Every application provides its own permissions, but android predefines permissions for certain tasks.
2) Android applications should provide its configuration file such as AndroidManifest.xml. These configuration file requires certain permissions.
3) By using the available information’s the Android system will automatically grant the permission, reject it, or ask the user if he grants this permission to the application during installation process.
Eg: – If the application requires Internet access, the user gives the permission during the installation process. This process is called “user driven security” In this system the user decides to grant the permission or to deny it. The permission cannot be denied or granted after the installation.
An Android application contains different components and these components are reusable for other applications, if these applications declare their components are available. This guide to the concept of a task in Android where an application can re use other android components to extract a task.
The most important Android components are
An activity is type of a presentation layer in an android application. Simply we can say that an activity is a type of screen or slightly incorrect as an activities can be displayed as Dialogs or can be transparent. Also an android application can have several activities.
2) Views and ViewGroups
Views are user interface interactive components. Eg: – buttons or text fields. The base class of Views component is android.view.View. Views contain some attributes and these attributes can be used to change their appearance and behavior.
A ViewGroup helps for arranging other Views. Eg: – A ViewGroup is a layout manager. android.view.ViewGroups is the base class of a layout manager and ViewGroup can also extend View. We should not use ViewGroups too deeply as this has a negative impact on the performance.
Intents are type of asynchronous messages and these messages allow the applications to request functionality from other android components of the android system.
Eg: – From services or Activities
Intent permits to join loosely coupled components to perform certain tasks.
An application can handle a component directly (explicit Intent) or ask the android system to evaluate registered components for a particular Intent (implicit Intents).
Eg: – The application could implement sharing of data via Intent and all components which permit sharing of data would be granted for the user to select. Applications register themselves to Intent via an IntentFilter.
Services handle background tasks without providing a user interface. The user can notify via the notification framework in android.
ContentProvider gives a structured interface to an application data via a ContentProvider and your application can share data with other applications. An android consists of a SQLite database which is frequently used as a conjunction with a ContentProvider to compel the data of the ContentProvider.
BroadcastReceiver can be registered for receiving the system messages and Intents. I will get notified by the Android system, if the specified situation happens.
Eg: – This component could get called once the android system completed the boot process or if a phone call is received.
7) Widgets (HomeScreen)
Widgets are primarily used on the android homescreen and are interactive components. Also we use this component to display some kind of data and give the permission to the user to perform actions via them.
Eg: – A Widget could display a short summary of new emails and if the user selects an email it could start the email application with the selected email.
8) Other components
Android provide many different components. They are “Live Folders” and “Live wallpapers”. Live folders helps to display data on the home screen without launching the corresponding application. Live wallpaper helps us for normal service application.