Android Interview Questions and Answers For Fresher

Android frequently Asked Questions in different-different Android job Interviews by interviewer. The set of Android interview questions here ensures that you offer a perfect answer to the interview questions Latest posed to you. Get preparation of Android interview questions and answers for Fresher.

What is Android?
Android is a software stack for mobile devices that includes an “operating system”, “middleware” and “key applications”.

What is 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.

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.

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.

Describe a real time scenario where android can be used?
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.

How to select more than one option from list in android xml file?
Give an example.Specify android id, layout height and width as depicted in the following example.

What languages does Android support for application development?
Android applications are written using the Java programming language.

What is the Android Open Source Project?
We use the phrase “Android Open Source Project” or “AOSP” to refer to the people, the processes, and the source code that make up Android.

Why did we open the Android source code?
Google started the Android project in response to our own experiences launching mobile apps. We wanted to make sure that there would always be an open platform available for carriers, OEMs, and developers to use to make their innovative ideas a reality. We also wanted to make sure that there was no central point of failure, so that no single industry player could restrict or control the innovations of any other. The single most important goal of the Android Open-Source Project (AOSP) is to make sure that the open-source Android software is implemented as widely and compatibly as possible, to everyone’s benefit.

What is an action?
A description of something that an Intent sender desires.

What is an activity?
A single screen in an application, with supporting Java code. An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View).

What is a service?
A Service is an application component representing either an application’s desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use. 
Each service class must have a corresponding <service> declaration in its package’s AndroidManifest.xml. Services can be started withContext.startService() and Context.bindService(). 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.

What is AVD?
An Android Virtual Device (AVD) is an emulator configuration that lets you model an actual device by defining hardware and software options to be emulated by the Android Emulator.

What is DDMS?
Android ships with a debugging tool called the Dalvik Debug Monitor Server (DDMS), which provides port-forwarding services, screen capture on the device, thread and heap information on the device, logcat, process, and radio state information, incoming call and SMS spoofing, location data spoofing, and more.

What is ADB?
Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. It is a client-server program that includes three components:
A client, which runs on your development machine. You can invoke a client from a shell by issuing an adb command. Other Android tools such as the ADT plugin and DDMS also create adb clients.
A server, which runs as a background process on your development machine. The server manages communication between the client and the adb daemon running on an emulator or device.
A daemon, which runs as a background process on each emulator or device instance.

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

Features of Android platform?

  •     Next generation platform for developing application for handheld device.
  •     Free & open source.
  •     Familiar & inexpensive development tools.
  •     Powerful library.
  •     Rich, secure application integration.
  •     Easy to publish.
  •     Free market for publishing application to customer.
  •     Growing platform, new feature are added with every new version.
Describe Android Application Architectur ?
Android Application Architecture has the following components:

  •  Services – like N
  •  Intent – To perform inter-communetwork Operation ication between        activities or services
  •  Resource Externalization – such as strings and graphics
  •  Notification signaling users – light, sound, icon, notification, dialog etc
Will it work on my phone?
The app will work on all phones and tablets running Android version 1.6 and above.

How much does it cost?
The app is free and ad-supported.

How do I save the app to my SD card?
From the device's Settings menu, go to Applications > Manage applications > The Guardian. Under the data header, choose "Move to SD card".

Types of Dialogs?
Dialog, AlertDialog, CharacterPickerDialog, DatePickerDialog, ProgressDialog, TimePickerDialog

List of Layout File?

  •     FrameLayout
  •     LinearLayout
  •     RelativeLayout
  •     TableLayout
  •     MultipleLayout
What is a Broadcast receivers?
A broadcast receiver is a component that does nothing but receive and react to broadcast announcements.

For example, announcements that the timezone has changed, that the battery is low or that the user changed a language preference.
All receivers extend the BroadcastReceiver base class.
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 the NotificationManager to alert the user like(flashing the backlight, vibrating the device, playing a sound).

What is a content provider?
A content provider makes a specific set of the application’s data available to other applications. The content provider extends the ContentProvider base class to implement a   standard set of methods that enable other applications to retrieve and store data of the type it controls.
However, applications do not call these methods directly. Rather they use a ContentResolver object and call its methods instead.

What is intent in Android?
A class (Intent) will describes what a caller desires to do. The caller will send this intent to Android’s intent resolver, which finds the most suitable activity for the intent. E.g. opening a PDF document is an intent, and the Adobe Reader apps will be the perfect activity for that intent(class).

What is a Sticky Intent?
sendStickyBroadcast() performs a sendBroadcast (Intent) known as sticky, i.e. the Intent you are sending stays around after the broadcast is complete, so that others can quickly retrieve that data through the return value of registerReceiver (BroadcastReceiver, IntentFilter). In all other ways, this behaves the same as sendBroadcast(Intent).

Example for sticky broadcast?
When you call registerReceiver() for that action — even with a null BroadcastReceiver — you get the Intent that was last broadcast for that action. Hence, you can use this to find the state of the battery without necessarily registering for all future state changes in the battery.

What is a resource?
A user-supplied XML, bitmap, or other file, injected into the application build process, which can later be loaded from code.

What Virtual Machine Android runs on?
Dalvik virtual machine

How do you define the user interface?
XML Format is the best.

How the nine-patch Image different from a regular bitmap? or Different between nine-patch Image vs regular Bitmap Image?
It is one of a resizable bitmap resource which is being used as backgrounds or other images on the device. The NinePatch class allows drawing a bitmap in nine sections. The four corners are unscaled; the middle of the image is scaled in both axes, the four edges are scaled into one axis.

What Programming languages does Android support for application development?
Android applications supports using Java Programming Language. which is coded in Java and complied using Android SDK.

How will you record a phone call in Android? or How to handle on Audio Stream for a call in Android?
Permissions.PROCESS_OUTGOING_CALLS: Will Allows an application to monitor, modify, or abort outgoing calls. So through that we can monitor the Phone calls.

What’s the difference between class, file and activity in android?
Class : The Class file is complied from .java file. Android will use this .class file to produce the executable apk.
File : It is a block of resources, srbitrary information. It can be any file type.
Activity : An activity is the equivalent of a Frame/Window in GUI toolkits. It is not a file or a file type it is just a class that can be extended in Android for loading UI elements on view.

How to Translate in 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.

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

Describe a real time scenario where android can be used?
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.

How to select more than one option from list in android xml file? 
For Example.
Specify android id, layout height and width as depicted in the following example.

What is the Android Open Source Project?
We use the phrase “Android Open Source Project” or “AOSP” to refer to the people, the processes, and the source code that make up Android.

Why did we open the Android source code?
Google started the Android project in response to our own experiences launching mobile apps. We wanted to make sure that there would always be an open platform available for carriers, OEMs, and developers to use to make their innovative ideas a reality. We also wanted to make sure that there was no central point of failure, so that no single industry player could restrict or control the innovations of any other. The single most important goal of the Android Open-Source Project (AOSP) is to make sure that the open-source Android software is implemented as widely and compatibly as possible, to everyone’s benefit.

What kind of open-source project is Android?
Google oversees the development of the core Android open-source platform, and works to create robust developer and user communities. For the most part the Android source code is licensed under the permissive Apache Software License 2.0, rather than a “copyleft” license. The main reason for this is because our most important goal is widespread adoption of the software, and we believe that the ASL2.0 license best achieves that goal.

What does “compatibility” mean?
We define an “Android compatible” device as one that can run any application written by third-party developers using the Android SDK and NDK. We use this as a filter to separate devices that can participate in the Android app ecosystem, and those that cannot. Devices that are properly compatible can seek approval to use the Android trademark. Devices that are not compatible are merely derived from the Android source code and may not use the Android trademark.
In other words, compatibility is a prerequisite to participate in the Android apps ecosystem. Anyone is welcome to use the Android source code, but if the device isn’t compatible, it’s not considered part of the Android ecosystem.

If my device is compatible, does it automatically have access to Android Market and branding?
Android Market is a service operated by Google. Achieving compatibility is a prerequisite for obtaining access to the Android Market software and branding. Device manufacturers should contact Google to obtain access to Android Market.

Is compatibility mandatory?
No. The Android Compatibility Program is optional. Since the Android source code is open, anyone can use it to build any kind of device. However, if a manufacturer wishes to use the Android name with their product, or wants access to Android Market, they must first demonstrate that the device is compatible.

How much does compatibility certification cost?
There is no cost to obtain Android compatibility for a device. The Compatibility Test Suite is open-source and available to anyone to use to test a device.

How long does compatibility take?
The process is automated. The Compatibility Test Suite generates a report that can be provided to Google to verify compatibility. Eventually we intend to provide self-service tools to upload these reports to a public database.

Who determines what will be part of the compatibility definition?
Since Google is responsible for the overall direction of Android as a platform and product, Google maintains the Compatibility Definition Document for each release. We draft the CDD for a new Android version in consultation with a number of OEMs, who provide input on its contents.

How long will each Android version be supported for new devices?
Since Android’s code is open-source, we can’t prevent someone from using an old version to launch a device. Instead, Google chooses not to license the Android Market client software for use on versions that are considered obsolete. This allows anyone to continue to ship old versions of Android, but those devices won’t use the Android name and will exist outside the Android apps ecosystem, just as if they were non-compatible.

Can a device have a different user interface and still be compatible?
The Android Compatibility Program focuses on whether a device can run third-party applications. The user interface components shipped with a device (such as home screen, dialer, color scheme, and so on) does not generally have much effect on third-party apps. As such, device builders are free to customize the user interface as much as they like. The Compatibility Definition Document does restrict the degree to which OEMs may alter the system user interface for areas that do impact third-party apps.

When are compatibility definitions released for new Android versions?
Our goal is to release new versions of Android Compatibility Definition Documents (CDDs) once the corresponding Android platform version has converged enough to permit it. While we can’t release a final draft of a CDD for an Android software version before the first flagship device ships with that software, final CDDs will always be released after the first device. However, wherever practical we will make draft versions of CDDs available.

How are device manufacturers’ compatibility claims validated?


There is no validation process for Android device compatibility. However, if the device is to include Android Market, Google will typically validate the device for compatibility before agreeing to license the Market client software.
Posted by Current News — Friday, 23 August 2013

Ada 1 Komentar untuk "Android Interview Questions and Answers For Fresher"