Interview Questions Android


1. What is android?
Android is a stack of software for mobile devices which has 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 language byte code which later transforms into .dex format files. 

2. What are the advantages of Android?
The following are the advantages of Android: 

* The customer will be benefited from wide range of mobile applications to choose, since the monopoly of
wireless carriers like AT&T and Orange will be broken by Google Android.
* Features like weather details, live RSS feeds, opening screen, icon on the opening screen can be customized
* Innovative products like the location-aware services, location of a nearby convenience store etc., are some of
the additive facilities in Android.
Components can be reused and replaced by the application framework.
* Optimized DVM for mobile devices
* SQLite enables to store the data in a structured manner.
* Supports GSM telephone and Bluetooth, WiFi, 3G and EDGE technologies
* The development is a combination of a device emulator, debugging tools, memory profiling and plug-in for
Eclipse IDE.

3. Explain about the exceptions of Android?
The following are the exceptions that are supported by Android 
* InflateException : When an error conditions are occurred, this exception is thrown
* Surface.OutOfResourceException: When a surface is not created or resized, this exception is thrown
* SurfaceHolder.BadSurfaceTypeException: This exception is thrown from the lockCanvas() method, when
invoked on a Surface whose is SURFACE_TYPE_PUSH_BUFFERS
* WindowManager.BadTokenException: This exception is thrown at the time of trying to add view an invalid

4. Describe the APK format.
The APK file is compressed the AndroidManifest.xml file, application code (.dex files), resource files, and other files. A project is compiled into a single .apk file.

5. What is .apk extension?
The extension for an Android package file, which typically contains all of the files related to a single Android 
application. The file itself is a compressed collection of an AndroidManifest.xml file, application code (.dex
files), resource files, and other files. A project is compiled into a single .apk file.

6. What is .dex extension?
Android programs are compiled into .dex (Dalvik Executable) files, which are in turn zipped into a single .apk file on the device. .dex files can be created by automatically translating compiled applications written in 
the Java programming language.

7. Explain the Architecture of Android ?
Top -> Applications (Contacts, Browser, Phone, etc) 

Below Applications -> Application Framework(Activity Manager, Window Manager, Content Providers, View
System, Package manager,
Telephony manager, Resource, Notification, Location managers)

Below Application Framework -> System Libraries(Like Sqlite, webkit, SSL, OpenGL, Media Framework etc)
& Android Runtime( Core Libraries and DVM).

Atlast Last -> Linux Kernel (which composed of drivers like display, camera etc.)

8. What is an activity?
A single screen in an application, with supporting Java code. 

An activity presents a visual user interface for one focused endeavor the user can undertake.

For example, an activity might present a list of menu items users can choose from or it might display
photographs along with their captions.

9. What is a service?
A service doesn't have a visual user interface, but rather runs in the background for an indefinite period of 

For example, a service might play background music as the user attends to other matters, or it might fetch data
over the network or calculate something and provide the result to activities that need it.Each service extends the
Service base class.

10. How to Remove Desktop icons and Widgets?
Press and Hold the icon or widget. The phone will vibrate and on the bottom of the phone you will see anoption to remove. While still holding the icon or widget drag it to the remove button. Once remove turns red drop the item and it is gone