Thursday, February 7, 2013

Android Basic Questions And Answers


Ques: 1 What is Android?
Ans:
Android is a mobile operating system that is based on the Linux kernel operating system. It is used in Android based smart phones. It allows developers to write managed code in Java language.

Ques: 2 Can i develop an Android app?
Ans:
Yes You can!!! If you know coding in Java, then you can easily develop. You just need to know Object Oriented concept of Java like Inheritance, Interfaces, Classes, Objects, Multithreading etc.

Ques: 3 What are the different versions of android?
Ans:
Different versions of android:

Ques: 4 Describe the APK format?
Ans:
Android Application Package File. Each android application file is compiled and packaged in a single file that includes all of the applications's code(.dex file), resources, assets and manifest file.
The application package file can have any name, but must use the .apk extension.
For Example: myappname.apk. 

Ques: 5 Why to use Android?
Ans:
Android is useful because:
  • It is simple and powerful SDK.
  • Licensing, Distribution or Development fee is not required.
  • Easy to Import third party Java library.
  • Supporting platforms are Linux, Mac OS, Windows.


Ques: 6 What are the features of Android?
Ans:
Features of 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.

Ques: 7 What are the advantages of Android?
Ans:
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.
  • SQLite enables to store the data in a structured manner.

Ques: 8 Describe a real time scenario where android can be used?
Ans:
Imagine a situation that you are in a country where no one understands the language you speak and you can not read or write. However, you have mobile phone with you.
With a mobile phone with android, the Google translator translates the data of one language into another language by using XMPP to transmit data. You can type the message in English and select the language which is understood by the citizens of the country in order to reach the message to the citizens.


Ques: 9 What are the Components of Android?
Ans:
The main components of android are:
  • Activity.
  • Service.
  • Broadcast Receivers
  • Content Providers.
Ques: 10 Explain the Architecture of Android?
Ans:
Please Refresh...
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 SqlLite, webkit, SSL, OpenGL. Media Framework) and Android Runtime(Core Libraries and DVM).
Bottom:-Linux Kernel(which composed of drivers like display, camera etc).

Ques: 11 What is an Activity?
Ans:
An Activity provides an interface for users to interact with the application and take an action (For instance: Login to a website). The different screens/windows of an application are the different activities. An application generally has multiple activities. Activities are like the pages in website.
Activity Example
For instance, in a Facebook app, the login screen is one activity, and the news feeds from your friends after signing in would be another one.

Ques: 12 What is a Service?
Ans:
A Service is an application component that can perform long running operations in the background and does not provide a user interface.
Another application component can start a service and it will continue to run in the background even if the user switches to another application.
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.

Ques: 13 What is a Broadcast Receivers?
Ans:
A BroadcastReceiver is a component that does nothing but receive and react to broadcast announcements.
For Example, announcements that the time zone has changed, that the battery is low, that the user has a language preference.
Broadcast Receivers do not display a user interface. However, they may start an activity in response to the information they receive, or they may use Notification Manager to alert the user like (Flashing the backlight, vibrating the device, playing a sound). 

Ques: 14 What are Content Providers?
Ans:
Content Providers provide a uniform interface that enables data sharing across different applications. Content Providers are the standard interface that connects data in one process with code running in another process.
Android itself includes content providers that manage data such as audio, video, images and personal contact information.

Ques: 15 What is intent?
Ans:
Intent is like a message that allows the application to request action from the other application components (like activity). For instance VIEW, CALL, PLAY etc.
For Example, In your Facebook app, the running activity is Newsfeed and you want to view a picture of your friend in a full frame. The click action on the picture would be the View Photo Intent and photo screen, which is a new activity gets loaded on the click as the message is communicated.
Intent Example
Ques: 16 What is an action?
Ans:
A description of something that an intent sender desires.

Ques: 17 What is an application?
Ans:
A collection of one or more activities, services, listeners and intent receivers. An application has a single manifest and is compiled into single .apk file into device.

Ques: 18 What is Context?
Ans:
Context is an interface to global information about an application environment.
It allows access to application specific resources and classes as well as calls for application level operations such as launching activities, broadcasting and receiving intents etc.

Ques: 19 What Virtual Machine Android runs on?
Ans:Dalvik Virtual Machine(DVM). You can relate it as JVM in Java.
The Dalvik VM is an interpreter-only Virtual machine that executes files in the Dalvik Executable(.dex) format, a format that is optimized for efficient storage and memory-mappable execution.

Ques: 20 Can i write code for Android using C/C++?
Ans:
Yes, but you need to use NDK.
Android applications are written using the Java programming language. Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language.
Every android application runs on its own process, with its own instance of Dalvik Virtual Machine. Dalvik has been written so that a device can run multiple VMs efficiently.
The VM is register-based and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included "dx" tool.
Android only supports applications written using the Java programming language at this time.

Ques: 21 Explain life cycle of an Activity?
Ans:
Click Here For Explanation...

For Short Notes Click Here...

Lets move on Installation Guide...