Android Interview Questions and Answers Set 1
1.What is Android?
Android is a Software for mobile devices which includes an Operating System, middleware and some key applications. The application executes within its own process and its own instance of Dalvik Virtual Machine. Many Virtual Machines run efficiently by a DVM device. DVM executes Java languages byte code which later transforms into .dex format files.
2.Why cannot you run standard Java bytecode on Android?
Android uses Dalvik Virtual Machine (DVM) which requires a special bytecode. We need to convert Java class files into Dalvik Executable files using an Android tool called “dx”. In normal circumstances, developers will not be using this tool directly and build tools will care for the generation of DVM compatible files.
3.What are the different data types used by Android?
The data can be passed between many services and activities using the following data types:
Primitive Data Types: This is used to share the activities and services of an application by using the command as Intent.putExtras(). This primitive data passes the command to show the persistent data using the storage mechanism. These are inbuilt data types that are used with the program. They provide simple implementation of the type and easy to use commands.
Non-Persistent Objects: It is used to share complex and non-persistent objects. These are user-defined data types that are used for short duration and are also recommended to be used. These types of objects allow the data to be unique but it creates a complex system and increase the delay.
4.What needs to be done in order to set Android development environment where Eclipse IDE is to be used?
Download the Android SDK from Android homepage and set the SDK in the preferences. Windows > Preferences > Select Android and enter the installation path of the Android SDK. Alternatively you may use Eclipse update manager to install all available plugins for the Android Development Tools (ADT)
5.What main components of Android application?
Activities: They dictate the UI and handle the user interaction to the screen.
Services: They handle background processing associated with an application.
Broadcast Receivers: It handles the communication between Applications and Android Operating system
Content Providers: They handle data and database management stuff.